How to move on from Turbo C++? [closed] - c++

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
In my school, they only teach on Tubro C++. I can program well in the DosBox but I want to develop my own applications, algorithms, etc. The problem is that I don't know where to start. The spectrum is so broad, I don't know what gcc or g++ are other than the fact that they are compilers.
I don't know how to use VS Code (mac) to compile & run. I don't know anything about the modern C++.
Where should I start?
I wanna do Machine Learning related stuff and GUI.
I actually have a browser based application in mind where I'd be needing Artificial Intelligence, cool GUI, etc.

That is a very good question. I think these steps would be the easiest for you -
Install Linux on your laptop or use macOS. I say this because you can develop in windows but it would be much easier on Linux or a mac because of the sheer size of the community.
Get familiar with the command line on Linux/macOS. You should try on Ubuntu which is one of the most popular versions of Linux. You must be able to use commands like - ls, cd, pwd. You can find lots of content for this easily.
Get familiar with the vim text editor.
After writing your first HelloWorld program on C++ using vim, you should learn how to use the g++ command to compile and run your code.
After you are familiar with all of the above, to make your work easier you can download and use text editors like Atom or Sublime.
These were my initial steps in the world of programming. I would also recommend you create an account on Github and browse other open source community projects, also learn git. Lastly explore also other domains and languages like web development, machine learning, python etc. Otherwise, if you are into competitive coding, C++ is indeed an excellent choice. For this, you can visit platforms like CodeChef, Hackerrank, SPOJ etc.
For tutorials, you can find many sites like Udacity, Coursera, edX. MIT OCW is a popular resource on YouTube for formal courses like Algorithms and Data Structures.
PS. Do not waste your time learning everything about everything. Instead, you should keep on experimenting and look up on the web whenever some error or a bug pops up.

Since TurboC++ was just a compiler, maybe you'd be happiest just moving into a full blown IDE(Integrated Development Environment)!
For Mac, I might recommend Eclipse. It's a very popular IDE and can be used for C++.
However, you'll need a compiler. GCC is a good compiler for Mac, but as far as I know you need Apple's "XCode" IDE to install GCC in the first place. So if you were to go through all of that effort you may just want to stick with XCode.
You'd need an Apple Developer login, but here's a tutorial on getting GCC up and running.
https://www.mkyong.com/mac/how-to-install-gcc-compiler-on-mac-os-x/
Of course, nothing is keeping you from sleeping around with some new languages, but if you want to stick to C++ I'd say get your compiler, find an IDE you like and get to learning.

First of all you need to know How compiler works and the program structure.
I recomend you an excelent course called "Programming Paradigms", from Stanford University. You can find it in ITunes University and it is free.

Related

C++ Workplace and compiler. Hello World testing for beginner [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am beginning to learn C++ after ages of not programming in any language (last thing I did were a few lines in Python). I know a little bit about programming, object oriented programming, but all theoretical. Not in any particular programming language.
I am following a few books about the language itself but I don't know where to test a few lines of code.
What could be a convenient workplace to do this? I tried installing Visual Studio but it isn't straightforward for me to see how to (or where in it to) write/compile and run small pieces of code.
Perhaps there are simpler environments that are more convenient for just beginning learning the language.
What simpler working environments can I use?
Is Visual Studio a good choice for beginning (testing my first lines of code in C++) and I just should study more how it works?
The simplest environment I found for starting to develop in C or C++ is Code::Blocks:
www.codeblocks.org
Or, directly, the download link with everything you need:
http://prdownload.berlios.de/codeblocks/codeblocks-13.12mingw-setup.exe
In there, just do "new Project", select "Console application", then "C++", and it will creates an "Hello World" Project for you.
Although Visual Studio is very good, the huge numbers of features immediately available can be intimidating for the beginner.
I would prefer visual studio IDE any day. And you have it available with you. It could be learning initially but worth it.
If you have questions / doubts about it some one here will help you.
Maybe just drop into Coliru and play around in there. No installation or set-up required, and immediate feedback on your snippets.
Alternatively, if you're on IRC, head to Freenode and send snippets to geordi prime.
I started with Dev-C++. It is a IDE which makes it easier.
Even if you don't know hello world in c++ or C you can make a new project at the top left and click on Console Application. Dev-C++ has a C++ tutorial which makes it a lot easier.
But I also suggest Microsoft Visual Studio for Windows 7 and up.
Just use a simple editor like Notepad++ and hand compile your sources with the compiler (VC++ or MinGW). It'd give you a lot of exposure on understanding build scripts which you'd later require for doing something serious. As for the compiler, I'd recommend MinGW since it's (almost) complete in its support for C++11; use a pre-packaged binary setup like TDM GCC.

C++ and Lua from USB [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
So about 2 weeks ago, I started learning C++ and Lua, and I would like to be able to:
compile C++ code (it would be a nice bonus if i could have a C compiler as well, as that's next on my list of languages to learn)
interpret (is that correct terminology?) Lua, and
do all of this from my usb drive WITHOUT downloading anything from the internet or changing the path variable. (I will mostly be working on school computers.)
As a side note, I have fallen in love with Sublime Text 2 (the portable version of which is already on my usb drive). If it's ABSOLUTELY necessary, I'll make do without it, but I would prefer being able to use it wherever I go.
Please be patient with me, as i have mentioned before, I just started learning how to program, and I have little to no knowledge on how things work. I have seen similar questions, but they never seem to help me much due to my limited knowledge, so PLEASE don't mercilessly close my question like others I have seen on this site.
Thank you in advance!
I recently added a page on Lua WIKI (great source of info) that may help you. It is a tutorial for complete newbies on how to build Lua from the sources using only free and "portable" (in the sense of "can be put on usb drives") tools. It is meant for Windows OS users. Do not forget to check the official getting started page and the main Lua site as well!
The fact that you cannot download anything is quite restrictive (how could you get a free compiler then?). Anyway as greatwolf mentioned TDM-GCC is a great C/C++ compiler for 32 bit x86 PCs. It is also patched to be perfectly "portable": I usually use it from a portable USB HD. The tutorial I mentioned shows you how to download it and "install it".
Note that although your sysadmin at school may have blocked your ability to change the path variable globally, you can set it for individual processes ("launched programs") using simple batch files (aka Windows command shell scripts).
Create a file named "myshell.cmd" with this content:
#set path=%path%;c:\the\path\to\my\app&cmd /K
the part c:\the\path\to\my\app must be the actual path of the directory (folder) where the application executable is placed. When you double-click on myshell.cmd a black box will open (assuming your sysadmin hasn't blocked this feature) where you can invoke the app executables.
For example, if you "installed" the TDM_GCC compiler in c:\myprogs\GCC inside that dir you will find a subdir named bin. That subdir must be put in the path, so your myshell.cmd file will be like this:
#set path=%path%;c:\myprogs\GCC\bin&cmd /K
Then in the "black box" I mentioned you can invoke the compiler typing:
gcc --help
As for your learning path, if you intend to learn both Lua and C or C++, I will advice you to try C instead of C++. C++ has more "high-level" features, but it is huge and although Lua can be used embedded in C++ code (of course this is an advanced topic anyway), it is designed to be directly embedded in a C application (it has an API which conforms to C conventions), so for a beginner probably the path Lua --> C --> C+Lua would be a bit easier. C in itself, although difficult to master, is a rather minimalistic language, so the information to digest about it is not that big.
Not to discourage you, but IMO both C and C++ are not the most suitable languages for absolute beginners (they are plenty of pitfalls and have almost no "safety nets" for beginners). But that's up to you, it heavily depends on your skills, dedication and motivation ;-)
Hope all this helps.
For windows,
Take a look at
http://nuwen.net/mingw.html
You should be able to extract the download to a usb directory. Then you can click on the .bat file open a command prompt with the correct path settings.
As a bonus, it already includes prebuilt boost, which will make your c++ use easier.
For the C/C++ piece would also recommend you start with C. Not for ideological reasons, just that it's a lot simpler if you're trying to work out the basics of compiling/linking etc.
As a first C compiler I would recommend the tiny C compiler
Tiny C Compiler
It's one of the simplest to get your head around that I've seen and you can still build lua libraries etc.
Once you're comfortable with that then progressing to one of the more powerful environments such as gcc under MingW or Visual C++ should be a bit less daunting.
Lua is trivial. Download the binaries, put them on your drive, and configure Sublime Text to invoke them on Lua files.
C/C++ is more complicated only because of the range of options is so vast. I use a 2003 version of Microsoft Visual C++, which covers my needs. I find a copy here.
Keep in mind that C++ is a vastly more complicated superset (non-strict) of C, so you're going to learn most of C in the process of learning C++. IMO, learning C first is better for a whole host of reasons. You'll hear some people argue the opposite, but in this case there's a clincher: Lua is written in C and its API is designed for C. Exposing idiomatic C++ (i.e. objects) to Lua is a big ball of complexity that you just don't need right now, while learning two languages.

IDE for realtime collaboration that works with C/C++, C#, .Net [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for an IDE that I can collaborate with other people. I'd like to have real-time editing and color coordination (meaning if Bob is online and changes some code it will high lite his changes, similar to sharing a Document on Google).
I've tried searching via Google but I can't find anything that actually suits my needs. I'm currently a college student and have projects to do with other class mates, but using Pastebin is a bit cumbersome as I have to have an IDE open + a web browser, then copy paste, share etc.
Is there any IDE out there that will compile for C/C++, C#, .Net etc with real-time collaboration? If I have to set up a server on my desktop to make it work I have no problems doing so
I believe that in practical terms, using a distributed versioning system (like git, perhaps thru gitorious or github) is a wiser idea, at least for usual programming languages like C (and you need a social convention, at least like Bob is working on file foo.c or on function foofoo while Alice focuses on bar.c or on function barbar). You may want to communicate in real time using IRC, chat, pastebin, etc .... in addition of git. You probably won't edit the same line (or perhaps even the same function) two distant people at a time.
The semantics of programming language like C is not fit to the idea of a simultanous edition of a single source at the very same time. (Defining languages friendly to this co-development idea is still a research topic).
BTW, you don't need an IDE to code in C or C++ (especially on Linux, which gives you a lot of other tools emacs or perhaps vim or gedit or geany, grep, make, ctags, git, awk, ... to use together). A big lot of very large C or C++ free software programs (GCC, the Linux kernel, Gnome/GTK, Qt/KDE, LibreOffice ....) are coded by many qualified people without IDEs. This is IMHO quite significant.
I suggest to try:
http://moonedit.com/ - simple real-time editor
http://www.saros-project.org/DemoVideo - real-time editor for Eclipse (so you could use C++ there)
at http://en.wikipedia.org/wiki/Collaborative_real-time_editor there are plenty suggestions.
This is an old thread but in case others are still interested in this topic/capability there are a bunch of web based IDEs nowadays. If you Google "web ide", you'll get a decent list of collaborative web IDEs. For completeness, I'll list one that I've used and liked:
Cloud9 IDE
Aside from small homework assignments, you are better off using a version control system like GIT or Hg. Though they are overkill for most small homework assignments; especially if it's an intro class and most students are already having a hard enough time learning the programming material by itself.
One other note is that a web based IDE is not necessarily mutually exclusive to using VCS. You can use GIT inside of Cloud9 IDE.
Save yourself the trouble and use version control of some sort. Be it git, hg, svn, or what have you. Pick your poison, but this is a large part of what version control exists for. For communication? AIM, IRC, Skype, it doesn't really matter.
In this case, you can either have good version control, a good IDE, and a good Chat program or you can have one program that syncs your code, allows you to chat, and allows you to edit code, but does all of the above poorly.
Check out Squad:
http://squadedit.com/
Hosted service so setup is easy, and it supports C++ syntax highlighting.
Have a look at EFC, http://www.eclipse.org/ecf/.
More specifically Cola, http://vimeo.com/1195398.

Where to Start With Contributing to Ubuntu (and other distros) [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
The learning days of my development started with C++, but the days since then have been many. I would like to look into contributing to Ubuntu (or Chromium), but I'm not sure where to start. I am extremely rusty when it comes to C++ and especially in such a large project. Is there a good place for me to start?
I'm mainly looking for resources on where to start in the plethora of code (since there's SO much code) and hopefully a helpful blog/tutorial for picking back up on C++ (preferably directed towards large open-source projects like Ubuntu)
Ubuntu is a distribution, that means it's a bunch of programs packed together in a nice way. You can contribute in many ways to distributions: maintaining package repositories, checking for bugs, artwork... If you're interested in the programming side, I'm sure you'll enjoy fixing bugs for the many packages that Ubuntu is made of (which are open source projects on their own.) Think of it as a layered approach, and you've got to settle in a layer to help.
Dive into their bugtrackers, find a bug, fix it and submit the patch.
There are a couple of c++ projects that come to mind: LibreOffice and KDE.
LibreOffice has already made a list of easy hacks so you should start there http://wiki.documentfoundation.org/Easy_Hacks
KDE has also a few tasks marked as Junior Jobs:
http://techbase.kde.org/Contribute/Junior_Jobs
As a rule of thumb the place to start contributing to a project is the bug tracker. Also start following the project from their public VCS compile->run->report bug->provide patch.
I'm not a C++ coder, so I can't help there beyond Googling for tutorials, but if you want to figure out where to start in any open source project, the easiest way is to check out their bug tracker, find a bug, and try to fix it. If you try to dive into something like Ubuntu without direction, you're likely to get lost and overwhelmed.
You can find Ubuntu's bug tracker here: https://launchpad.net/ubuntu
I bealive you would be more interested on Chromium project for a setout. The browser code can be manipulated on Linux, Windows and Mac with the more appropriate tools. They have a IRC channel too, there you can clarify your doubts.
Generally, when you get on great code, it is allways good to resort to the one with more means to do things quickly and easier. Google has a lot of tools and informations that fit to start-up programmers.
There is a list of help-wanted tasks on http://code.google.com/p/chromium/issues/list?q=label:helpwanted&can=2.
Claudio M. Souza Junior
Developer
If you're looking to start contributing to the Linux kernel itself(written in C, not C++) the lecture Write and Submit your first Linux kernel Patch given at the FOSDEM conference by Grek Groah Hartman, core member of the Linux Kernel team himself, is a great start and motivating factor. As a bonus point, the advices and contributing points revealed in the lecture are applicable to any other open source project in my opinion.
There's nothing standing in your way to contributing to Open Source. Start right now with as low as documentation, minor bug fixing or even adding/improving or fixing grammar issues with comments to existing code. All of these are important and they also help develop your knowledge about a given project or part of a project, which will then enable you to dive deeper in more complex aspects of your chosen project.

Simple GUI IDE? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I'm looking for a GUI Linux IDE.
Specs:
simple and fool proof. normal look & feel
full as-you-type indentation in most languages
a compile+run button, a debugger, auto-refactoring for C++
basic unintrusive support for common buildsystems - straight make, cmake, qmake, autotools
smooth workflow. proper keyboard support, no jarring transitions between debugging/coding modes, etc
What i've tried:
KDevelop is bloated and buggy, makes it difficult to even transfer projects between machines etc
jEdit is ugly, feature poor and it's difficult to find things. but it does indentation well.
Anjuta, Geany and a bunch of other micro-IDEs for GNOME fail at indentation and misc features
Code::Blocks only does C++, it's pretty complex and it can be hard to get things working with libs etc
vi and e-macs are nice but I'm not taking the time to learn them right now, and I want something coworkers can use as well
NetBeans has a terrible Swing look, weird code editor. also it's pretty slow and seems complicated. great features though.
Eclipse. pretty huge and complex, I don't like the UI. I feel like I can't do anything without a tutorial
Presently I use KDevelop for work and gedit+terminal for hobby dev, but wanted to see if I'm missing out.
You could try QtCreator. It's not quite complete (as of this this posting at least), but it might be closer to what you want than some of the others you've tried. It's very keyboard friendly.
I tried PIDA after this answer, and I think it's pretty good. You'd still have to learn vi/emacs to use it, though.
I'd also suggest you take a look at MonoDevelop. It's basically M$ Visual Studio for Linux, and it has all the features you listed.
maybe just try kate. it's a great editor with plenty of plugins, ability to use built in terminal, code folding, and it fits nice in kde desktop. Plus it's very fast.