views:

372

answers:

9

I'am aware there has been a generic question about a "best IDE in C++" but I would like to stress I'm a new to C++ and programming in general. This means I have the needs of a student:

  • relatively easy and unbloated working environment
  • things just work, focus on the code
  • color coding to show the different language features (comments, etc)
  • not too unfriendly (not a simple editor, something to handle projects from start to finish)
  • cross-platform so not to be bound with specific system practices

I think the above are relatively reasonable demands for an educational IDE, perhaps excluding the last as such universal tool might not exist. Any ideas?

+3  A: 

I would recommend Komodo Edit.

It functions as a great text editor that I've used on Ubuntu, Windows(XP/7) and OSX. It's big brother is a full blown IDE but KE still allows for projects and some great extensions. It's also free and open source. I found it easy to get started quickly with it and as your skills grow, it has the ability to keep up.

Edit to add a link to ActiveState's community site for Komodo Extensions. If you decide to try out KE, I'd suggest the RemoteDrive Tree (ssh,ftp,scp remote editing) and Source Tree as a start.

chauncey
The website doesn't mention C++ support? Seems to be more for scripting languages.
20th Century Boy
it doesn't support c++, does it?
Mykola Golubyev
It does support C++ as well as everything from Ada to C# to YAML.
chauncey
+2  A: 

Until the last point I would have said Microsoft Visual C++ Express Edition, which is free and fits your first 4 criteria. Cross platform you'd be looking at something like emacs or vim, neither of which are particularly friendly. On Windows I actually use Notepad++ for small C++ programs as it has good syntax highlighting and a (limited) intellisense.

20th Century Boy
+2  A: 

I'd recommend Eclipse CDT as it does good code completion and it builds code on the fly, so you can see your errors immediately which is very good for a language studying.

Mykola Golubyev
Hardly unbloated? ;-p
20th Century Boy
Yes, building the project from start to finish is important for an educational tool for programming. If ones wants to learn how compiling/building works could probably do it without these complete solutions.
Kensai
At first you just need to understand the language itself and the OOP concept. And only then dive into make and compiler options parameters. BTW Eclipse allows you to use your own makes, so don't see any problems here.
Mykola Golubyev
A: 

Personally, it's my opinion that all C++ IDEs suck. When I write C or C++, I tend to use some sort of powerful programmer's text editor along with command line compilation. If I'm just messing around and have a couple source files, I'll just invoke gcc -g -o myprog *.c on the command line myself. If I have a more involved project, I'll just write a simple makefile. You could also look into gmakemake if you don't want to bother learning makefile syntax just to compile your programs.

On the Mac side, I have always been a fan of both BBEdit and TextMate, but much more so of the latter, especially given its lesser price tag and more modern feel. Both have project organization features.

On Windows, I'd stick with either e (which is basically a port of TextMate to Windows) or Notepad++. The downside of Notepad++ is that it doesn't have any project organization features, whereas e does. You could also look at SciTE, but like Notepad++, it has no project org features.

As for Linux, I'm personally unsure. I'd stick with other people's answers covering that platform for recommendations there.

Marc W
I've been looking into project managment programs that use notepad++ as an external editor, but haven't had much luck beyond some ftp bits.
Ape-inago
+9  A: 

It depends on which world are you coming from to learn C++.

  • Do you have previous Java experience? - Use Eclipse CDT.
  • Have used .NET previously? - Go with Visual Studio C++ Express Edition (and then throw it away if you really need multiplatform IDE, not just code).
  • Are you an Unix guy? Use just a syntax-highlighting editor + Makefile. When you want to learn basics of the C++, the project should not be complicated and it is well invested time to learn how the C++ compiler is called with preprocessor options, etc.
Matej
OK, don't laugh... Visual Basic.So to be sincere: no previous experience in C-syntax.
Kensai
If you've done VB on windows, you should consider Visual Studio C++
Liran Orevi
+2  A: 

Assuming Linux/Unix like system ...

I've found out that it's much easier and beneficial to go the other way round. Try using 'simple' editor like vim and for C++ just Makefiles to compile using gcc and linker.

I've started using that at uni and 5> years and couple of companies later it's still the easiest and most flexible option because you have quick access to all settings in one simple file.

Even when you switch to IDE later on you will know what to look for if things don't work because you will know the basics for example what are the steps to go from source file to object file and link to binary executable, how to handle libraries and so on. These things change between IDE's and are often complicated to trace and modify.

You can start with simple makefile and keep improving it over years. It's easy to copy it to your project directory and update file names - for C++ the compilation process will be fairly standard between projects.

I highly encourage you to consider this option. I've learned a lot doing it that way and you have a backup plan when you IDE just wouldn't work.

I keep one generic Makefile that compiles main.cpp into executable. To compile something quickly I just copy it into directory and make.

My current workflow is to open all files in project directory (flat file system) with vim (vim *.cpp *.hpp), edit, compile with :mak (or :mak -C .. debug) from within vim to invoke the Makefile stored in relevant directory, after compiling it'll jump to first warning/error, use :cn to go over errors, fix what's needed, open errors in separate window with :cope (close with :clo or unload file with :bd, jump between split windows with ctrl-w ctrl-w or ctrl-ww - hold ctrl and press w twice) ...

Vim has syntax highlighting millions of other features, I'm using tags (or ctags) to navigate code from within vim and so on.

stefanB
Thanks for the Vim tips.
Liran Orevi
+3  A: 

Code::Blocks is free and really easy to install and use. I always recommend it to my students.

fbinder
+3  A: 

I've heard good things about Code::Blocks. Might be a bit complex, but you can close any unneeded panes, and it's cross-platform.

Chris Doggett
+2  A: 

If you are using both windows and linux (as your comment indicates), I'd recommend Qt Creator. Qt is cross platform so your apps will work on linux, windows, and mac. Qt has excellent documentation, too, so it's very newbie friendly. Signals and Slots take a bit of getting used to, but IMO it's worth it.

KeyserSoze
I liked Qt Creator as well because it seems to fulfill ALL the initial demands for an educational tool. It can handle a project from start to finish and even work with simple C++ projects without the Qt toolkit. The only problem is... it's version 1.1! Is this safe?I always thought developing products such as IDEs become good enough on their 2nd or 3rd versions...
Kensai
The version 1.1 thing is a concern. 1.0 could barely add variables to the watch list. Debugging is still somewhat painful. That said, I'm using it and lovin' Qt. Giving snapshots of my Linux-developed project to a coworker to play with on QtCreator under Windows without a single change or hassle is pretty nice. :)
darron
True! On the other hand, being only version 1.x might be a boon from the "simplicity" aspect. IDEs notoriously add more and more features as versions come up and you might end up with a tool which is as bloated as the competition.
Kensai