IDE and Compiler

jae

Golden Member
Jul 31, 2001
1,034
0
76
www.facebook.com
Hello all,

I've been using Linux increasingly over the past few years. Now I'm at the point where I use it as my primary O/S and run Windows in VBox. I've been wanting to pick up the C++ language, for no real reason just would like to have something under my belt besides hardware and networking. I've picked up a couple books; Programming C++ for Dummies and Programming Principles and Practices (Stroustrup), and my friend's slides from his C++ programming class.

I would just like to know the differences between the compilers and what IDE you all suggest from experience? C++ for dummies uses Code::Block, and I only GNU Compiler Collection installed.

Also, I'll probably pick up python eventually. Thank you guys in advance.
 

TheRyuu

Diamond Member
Dec 3, 2005
5,479
14
81
As far as IDE's go you might want to check out KDevelop or Qt Creator.

Everything on linux is going to use GCC (for c/c++ at least). It might help to just concentrate on C before moving on to all the insanity of C++. For all the basic beginner stuff a simple text editor might suffice (vim/nano). I have no idea if you have any knowledge of other programming languages so it could affect how you approach it.
 
Last edited:

Pia

Golden Member
Feb 28, 2008
1,563
0
0
C and C++ are both poor choices for a beginning coder. You'll struggle to get anything done, and even when the program looks like it's working, there's a good chance it is broken and you just don't have the experience to notice it. Knowing what and how to test, and learning to use tools like make/gdb/valgrind/lint is critical for working with C or C++. I recommend starting with a good text editor (of your choice) and GCC/G++, then adding those tools in the process when you start to encounter problems which they can help with.

If you do C++, take care to learn modern C++ instead of the C-with-classes language it was ten years back. If in a for-beginners text you run into printf before cout, arrays and pointers before std::vector, and there are a lot of pointers in general being used instead of references, it might be a good time to look for another set of materials.
 
Last edited:

homercles337

Diamond Member
Dec 29, 2004
6,340
3
71
For linux development i prefer code::blocks, but was not successful in getting it to run in Ubuntu (little effort was committed to remedying this situation). As a result i run it in Debian.
 

Net

Golden Member
Aug 30, 2003
1,592
3
81
I've used g++ and eclipse. I've heard good things about Qt, I may try it out. I used valgrind for testing for memory leaks. I have a valgrind config file to ignore strings and other false positives if you are interested.

to go about learning C++ I'd side with TheRyuu. Start with learning how memory management works. This will involve using a lot of c libraries and avoiding the STL.

Then pickup a good book on object oriented programming so you can learn how to solve problems in an object oriented language. http://www.amazon.com/Head-First-Obj.../dp/0596008678

Then pickup a good book on C++ http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list

Its a lot for beginning. There are a lot of programming languages out there. Looks like your interested in an object oriented programming language. Sometimes to make it easier to learn people will avoid the memory management by using a language like java.

Anyway have fun!
 
Last edited:

jae

Golden Member
Jul 31, 2001
1,034
0
76
www.facebook.com
Well thanks for all the replies guys. I appreciate the help. Currently I know I little a C# and VB.Net. I was pretty good especially seeing that I am more into the troubleshooting and networking (at least that's what my professor told me); my professor even offered me and internship for his business he's starting.

Maybe, I'll look into python first, while learning about the memory management of C#. Thanks
 

dwell

pics?
Oct 9, 1999
5,185
2
0
Python is a lot easier to understand for beginners though the functional programming stuff can be confusing.

Check out Sublime Text 2 if you're looking for a cross-platform programming editor:

http://www.sublimetext.com/

You can run Python right from the editor.
 

hooflung

Golden Member
Dec 31, 2004
1,190
1
0
I'm either in Netbeans or MyEclipse lately. The latter being a pay-for build of Eclipse I find much more stable. Both are good for c++ development (just get the vanilla eclipse tho for c++) however Java is probably more suitable for doing proper OOP programming. You can then use Jython to learn python and have best of both worlds.
 

Pia

Golden Member
Feb 28, 2008
1,563
0
0
to go about learning C++ I'd side with TheRyuu. Start with learning how memory management works. This will involve using a lot of c libraries and avoiding the STL.
If you actually want to learn C++, starting with C like TheRyuu suggested is a bad idea. You don't learn anything from C that you couldn't also learn in C++, and habits acquired from C result in crappy C++ code.

As for memory management, Koenig's Accelerated C++, which is probably the best beginner C++ book, doesn't discuss manual memory allocation before 10th chapter. In C you have to do manual allocation to get anything done. In C++ it's usually a sign of bad code.
 

tatteredpotato

Diamond Member
Jul 23, 2006
3,934
0
76
For C/C++ don't bother with an "IDE" in the classic sense, but rather use vim and plugins.

Vim is more universal than any IDE and much more customizable. Be warned that there will be a learning curve involved, however it is definitely worth it.
 

Gibson486

Lifer
Aug 9, 2000
18,378
2
0
I usually, check, compile, and build from the terminal. Not sure why, but it is just easier for me to do it that way in linux (I used both ubuntu and fedora). It's probably because it's how I learned it. Obvioulsy, it sucks when you compile code and you see 10 errors. The terminal does not really display it that well, but as long as the editor tells me the line numbers, it's all good.

Also, i do not understand why people say C/C++ is a bad beginner language. No matter what language you learn, you still have to know how to create arrays, how to iterate through them, how to pass parameters, and all the types of loops. It's the basics of any language.
 
Last edited:

Absolution75

Senior member
Dec 3, 2007
983
3
81
As a n experienced c++ programmer, I'd suggest just avoiding C, you'll just develop bad habits. There isnt a lot that C can do that c++ can't. C is used even less than C++, and once you know C++ well, any other non-functional language will be easy to pick up.
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
As a n experienced c++ programmer, I'd suggest just avoiding C, you'll just develop bad habits. There isnt a lot that C can do that c++ can't. C is used even less than C++, and once you know C++ well, any other non-functional language will be easy to pick up.

How much embedded work have you done?

C has it uses and is very much used still.