C++ is an amazing language, with loads and loads of features, not to mention some really great libraries that go with it.

I liken C++ to chess: it won’t take me more than an hour or so to teach someone the rules of the game, but mastering it and becoming a Grandmaster is a different matter altogether. Similarly, getting familiar with a small subset of the features of C++ may take a couple of months; mastering it, on the other hand, is a different ballgame altogether. Again, notice I said a small subset, since C++ has grown as a language over the decades and so has its feature set, not to mention many of the libraries which have been conceived and developed in parallel with the language.

However, the most critical part of C++ is understanding how the various moving parts of the language mesh together, and this is what separates the men from the boys, so to speak. In fact, there is no one person who could say that he or she is perfect in their knowledge of C++ since there is an almost endless set of permutations and combinations in which its language features work together.

For instance, as far as I know, the entire standard library is almost 100% templatized. Add to this a host of other open source libraries (like boost, for instance), and you will realize that there’s way too much in C++ that you have yet to learn, even if you have been using the language for years. And I haven’t even touched upon the complex language features in this equation!

Let me give you a couple of examples, both having to do with operators.

1. Do you know that there is a difference between the new operator and operator new? (No, we aren’t playing with words here, check out Scott Meyers Effective C++.)

2. Why are experienced C++ programmers wont to use ++i and not i++ in a for loop, especially while iterating through a collection? (Google for it.)

There are literally hundreds of such nuances of the language, and enlightenment typically comes after you have worked with the language for a while.

During the earlier days of my career, I would often be asked during interviews to rate my C and C++ skills on a scale of 10. I would rate my C skills at 5 or 6, and C++ at 3 or 4, while at the same time (apparently absurdly) maintaining that I was better at C++ than C. I would attempt to explain this apparent contradiction by saying that while C is a great language to learn, C++ is a much more complex beast, and it takes a very long time to master it, considering how its various features work in tandem.

Original post: 

Image courtesy: By Jeremy Kratz - https://github.com/isocpp/logos, Public Domain, https://commons.wikimedia.org/w/index.php?curid=62851110

 

Please spread the word among your friends & associates