Hi guys, I'm quite new on the forum and I was wondering if you could help me with this. I am currently in my second year of a BSc in Mathematics/Finance and I just completed an object-oriented programming course in Java using Eclipse as a development tool. Considering the above reading list and the fact that I have some knowledge of Java, which book would you recommend to learn c++, and would you also have an IDE to recommend ?
Any help would be appreciated.
Thank you!
After
C++11 the book situation has clarified considerably -- pretty much just two "starters" books to choose from (plenty to read afterward, but either one of the two for starters, depending on your background).
Since C++11 is the way to go when learning C++ --
http://isocpp.org/wiki/faq/cpp11#cpp11-learn -- your choices are easier now.
So, here goes:
- No prior programming background:
http://www.stroustrup.com/programming.html
PPP2 ("Programming -- Principles and Practice Using C++", 2nd Edition) by Bjarne Stroustrup
* Nice, since it's also written well with a careful pedagogical style focusing on the aspects that are not obvious to those completely new to programming.
- Prior programming background (doesn't really matter whether functional/imperative/OO, IMHO):
C++ Primer, 5th Edition by Stanley B. Lippman, Josée Lajoie, and Barbara E. Moo
* Thorough and informative, while readable and approachable, focusing on presenting the most important (from the productivity / usefulness POV) things first, while not being sloppy nor forgetting to warn about things that will bite you in practice (most other C++ textbooks "for beginners" fail miserably here, IMHO only making the entire experience harder).
For more choices -- and the follow-up books worth reading afterward (there's plenty, BTW) -- see:
http://isocpp.org/get-started
http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list
//BTW, During your studies, and when actually working with C++,
cppreference.com is also going to be your friend.
// There's that other C++ on-line reference site... I'd forget about it
(In case this isn't obvious, in 2014 I would definitely recommend against learning C++98/03 -- by implication, don't waste your time with the books focusing on this, it's not worth it -- let alone C, first, especially since you're already familiar with a compiled language. And even if you weren't I probably wouldn't start with C, either.).
As for the IDE -- if on Windows I'd at least familiarize myself with Visual Studio (if you're student, you can get Professional edition for free from Microsoft Dreamspark; if not, Express edition is always free and quite suitable for learning). One may like it or dislike it, but it's pretty much the standard in the Windows development.
If on Linux, then QtCreator, since it's gaining considerable momentum (also becoming popular in the gamedev community), is actively developed, and at least tries to be user friendly.
I used to recommend Xcode for Mac OS X (for the reasons somewhat similar to Visual Studio on Windows), but it's sufficiently... different that nowadays I'd also consider QtCreator there.
Oh, and if you really don't want to use MSVS for some reason, but want an IDE that works on Windows, I'd probably go with QtCreator, too ;-) The cross-platform & CMake support just might come in handy, after all ;-)
On a side note, since you've been using Java, JetBrains (the makers of IntelliJ IDEA, among others), are also working on their own C++ IDE, which may be a serious contender in the future:
http://www.jetbrains.com/objc/features/cpp.html
In addition to this, they're also working on ReSharper C++, a productivity plugin for MSVS:
http://www.jetbrains.com/resharper/features/cpp.html
May be worth taking a look from time to time...