I check out of the Basic Combat Skills phase of flight training this Thursday, and have an expected wait of several months before I start training in whichever advanced aircraft I end up with. Naturally, a project was spontaneously created to fill the anticipated upcoming free time. In this case, the project is to learn C++.
I sometimes feel like I skipped past something, getting a CS degree without ever actually using that language. Like it or not, it’s the language of choice for all modern heavyweight applications, and it’s about time that I gained fluency in it. However, I’m not sure what books to use. I got the C++ Primer Plus 5th ed. because it got good reviews as a learning book, and C++ in a Nutshell because I think of C++ as a language for which an O’Reilly book is a good investment. However, learning the language using these books is going to be interesting. Looking at a random page in the Nutshell book, I find a detailed discussion on the relative merits of Wide Characters (type wchar_t) versus Multibyte Characters (type char[]). It’s good stuff, but not exactly intended for someone just learning the language. On the other hand, the Primer is extremely basic: it mentions several times that you must be precise in spelling and capitalization for things to work, and explains in detail what a comment is and why it is a good idea to use them.
Do any of you know of any books or references which teach the language without also assuming that you must be taught the fundamentals of OOP?
For extra, special bonus points: what are the relative merits of using MSVS vs. the Eclipse C Development Toolkit?
Read Thinking in C++ By Bruce Eckel. Its a great book, one I still use as a reference. It really shows you whats going on under the hood w/ C++. The only thing you may not like about it is that it makes some assumptions that you are coming from a C background in areas.
I LOVE VS. Its debugging tools are great. Eclipse is a little more multi-platform friendly, but I find the debugging tools in VS are much better than Eclipse. The interface also makes more sense to me, one wrong move in eclipse and you can be in some bizarre viewing mode that takes awhile to reset. I have used Eclipse for about a year now, and still have this problem. I have never had the need to “read the manual” with VS like I have w/ Eclipse.
(Can’t resist: Eclipse is more than a little more multi-platform friendly because MSVS is downright xenophobic. Windows, Windows, all the way. Since I know you have a strong fondness for FreeBSD, it might be a mistake to get too comfortable with a Windows-only IDE.)
I learned C++ reading Stroustrup’s “The C++ Programming Language.” I can’t claim that’s the best C++ intro book out there because I haven’t read others, but you might be surprised at how readable it is. I do still use it as a reference.
However — my strongest possible recommendation — beyond your intro book of choice, read everything you can get your hands on by Scott Meyers: Effective C++, More Effective C++, Effective STL, anything since then. By forewarning you of many glitches, gotchas and WTFs, Meyers will save you major time starting right away. Moreover, his readable, informative analysis of every such situation gives you a deep understanding of the language and its foibles. Absolutely indispensable.