How does one get started with C++? Where should an aspiring developer start? What books should they read? These are some questions that do the rounds of many developers who want to dip their toes in the magical world of C++. This post is an attempt to address some of the questions while also trying to provide my own perspective. If you find the links and my suggestions useful, please do let me know. If you do not find them useful, kindly ignore.
C++11 a.k.a Modern C++ is a new language. It feels different from the old C++ (C++98) and places great emphasis on developer productivity enhancing facilities, focus on runtime performance, writing safe, efficient and portable code. Hence it is very, very important to learn the nuances of Modern C++ v/s trying to learn the old C++ and attempt to fit the old in the new.
Here are my recommended books.
- C++ Primer by Stanley Lippman et.al. The latest edition has been completely re-written for the C++11 standard.
- The C++ Programming Language 4th Ed by Bjarne Stroustrup. The 4th edition has been revised and updated for the C++11 standard.
- The C++ Standard Library, 2nd Ed by Nicolai Josuttis. The 2nd edition has been revised and updated for the C++11 standard. This book focuses on the Standard Library that is part and parcel of the C++ programming language.
These books are by no means exhaustive but will allow you to start learning C++. One can begin with C++ Primer and then move to the other books to understand and learn about advanced topics.
Having said that, reading in no way substitutes for actual coding practice. Spend as much time as possible writing code. You can start with simple programs that are discussed in the books above and slowly work your way to adding functionality and features to those programs. Or you can also start writing your own programs. Either way, know your tools and write as much code as possible while applying the concepts you learn.
A lot of coding problems have probably been already solved. The technology world is a rich source of learning from one another, provided one learns to ask the right questions in the proper format. Hang out on sites such as stackoverflow.com, codeproject.com, MSDN forums etc and learn from fellow developers. If you know the answer to a problem, help your fellow colleagues from the industry. Participating in community activities helps you build confidence in your tools, your craftsmanship and ultimately your own abilities. Think of this as an investment for your own good and the benefit of all.
In addition here are a few links you should regularly visit to keep yourself updated with all major events and happenings related to C++.
The Home Page of Standard C++.
- http://www.stroustrup.com/ The Home Page of Bjarne Stroustrup, the designer of C++.
- http://herbsutter.com Herb Sutter on software, hardware, and concurrency. He has also begun an updated series of Guru of the Week Questions based on C++11 and will be updating his famous Exceptional C++ series of books with C++11.
- http://scottmeyers.blogspot.com/ Scott Meyers is one of the world’s foremost experts on C++ software development. He offers training and consulting services to clients worldwide.
Again, no means exhaustive but good starting points from where you can learn C++. Once you learn the basics of standard C++, you can then move to learning platform specific extensions like C++ /CX and develop cool Windows Store apps!