If my recent post about the virtues of C++ convinced you to learn C++, or if you already know some C++ and my post inspired you to gain a deeper understanding of the language, you may be wondering where to start and what resources are available to you. Here are some recommendations:
If you are new to C++, it is crucial to have a good book that you can learn from and use as a reference. Here are some popular choices:
- Accelerated C++ by Koenig and Moo
- C++ Primer by Lippman et al.
- The Thinking in C++ series (Volume 1 and Volume 2) by Bruce Eckel, which is also available for free online here.
For intermediate/advanced programmers:
Once you know the basics of C++, you will want to fine-tune your skills and learn about some of the subtler aspects of the language.
The first thing you will want to check out is Marshall Cline’s C++ FAQ. It covers many subtle language issues that come up often and are good to know about. You will learn a lot from this FAQ – I know I did.
To gain understanding of some deeper and more profound design issues in C++, read Herb Sutter’s Guru of the Week series. These articles are pure gold. Presented in an intuitive question-answer format, they will teach you things about C++ that you would probably never have thought about otherwise. It is worthwhile to go through and read every single article in this series, in order. Herb’s other publications are also enlightening.
Finally, there are a few books about C++ style and design that are must reads:
- Effective C++ and More Effective C++ by Scott Meyers
- Exceptional C++ and More Exceptional C++ by Herb Sutter (the title is a clever pun – proper exception handling and exception safety are pervasive themes in these books)
- Modern C++ Design by Andrei Alexandrescu
- Effective STL by Scott Meyers
- C++ Coding Standards by Herb Sutter and Andrei Alexandrescu
There are many others, of course. Here is a slightly longer, though still far from complete, list.
Beginners and experts alike need a C++ language and library reference handy when programming. Recommendations:
- The C++ Programming Language by Bjarne Stroustrup. Written by the creator of C++, this is a very popular and comprehensive C++ reference.
- This is a good online reference for the C and C++ standard libraries. You can think of it as a collection of man pages for standard library functions and classes.
- This is a slightly more comprehensive online reference for the Standard Template Library (a large component of the C++ standard library). Technically speaking it’s a reference for a particular implementation of the Standard Template Library, but it serves as a general reference.
- If you prefer a hard copy standard library reference, The C++ Standard Library by Nicolai Josuttis is quite comprehensive.
- Finally, the ultimate and official C++ reference is the ANSI/ISO C++ standards document. I am including it here for completeness only, I am not recommending that you read it – its target audience is primarily compiler writers and library implementers.
Last but not least, programmers of all skill levels need a place where they can ask questions if they get stuck (yes, experts get stuck too. C++ is a language that you can never know everything about). There are two sites I highly recommend:
- CodeGuru Forums, especially the Non-Visual C++ Issues Forum. This forum is frequented by C++ experts who are happy to help out anyone with C++ issues.
- Stackoverflow.com is a quick way to get just about any programming-related question answered. Be sure to tag your question “C++”.
Whether CodeGuru or Stack Overflow is a better venue for your question is largely a matter of personal preference. You will get prompt replies from experts on both sites, but the pace and atmosphere is slightly different – on Stack Overflow you tend to get brief, to-the-point answers, while on CodeGuru Forums interesting questions often turn into more general discussions. I tend to prefer the forums.