# I know C++ 2003 How to start learning C++ 2017?

Tl;dr - the subject is enough. For background, read below.

I am a professional, freelance, embedded software developer. I first learned about C++ in the 90s and taught myself from a book C++ for C programmers.

The beauty of that was that it assumed that I knew C and didn't have to spend chapter after chapter explaining how to declare a variable/what a variable is, function/passing parameters/returning a result, loops, etc, etc, etc.

So, it cut quickly to the chase and I started learning from page 1, rather than skipping forward.

Fast (?) forward a few decades, and I no longer code (much) assembler. Work seems to be split between C, Ada (mostly for defence) and C++.

It has been four years since my last C++ gig, and, industry being conservative does not adopt new version of languages for some time, until they can be seen to be widely accepted as stable (if any of you non-industry guys what to know why, then we generally want to wait until "they get the bugs out of the new compiler". Given that a lot of embedded can be life-critical, you can understand why).

So, now I am seeing ads requiring C++ 2014 and 2017 (and my latest experience is 2003). The delicious irony of this is that I know, from bitter experience, that coding standards will forbid me from using the new features intruded in those versions.

All of my life, I have taught myself new languages & concepts from books. Earlier this year, I took a leap of faith & taught myself Flutter/Dart (for personal, non-professional use) from a Udemy course. That was an eye-opener, and I won't be responsible for the death of any more trees in future.

But, I digress (this entire screed has been a digression, if you ask me). I have now purchased another Udemy course to learn C++.

And, finally, after all of that, my question is still the same as its title - "I know C++ 2003 How to start learning C++ 2017 ?".

Do I watch the start of each chapter, and skip if I yawn? Do I read the table of contents and take a stab at where to jump in?

Given that you are a group of educators, I imagine that this is not a new situation to you, but am not sure that it has an answer which does not involve the length of pieces of string.

• You might browse en.cppreference.com/w/cpp and look at the various C++ versions and features. When you find something interesting, experiment with it and see if you find it useful. – Fritz Sieker Dec 29 '20 at 18:54
• Recommend this lecture by Stroustrup circa 2014 on "The Essence of C++" in which along the way he highlights what he considers canonical C++14 usage: youtube.com/watch?v=86xWVb4XIyE – Daniel R. Collins Dec 30 '20 at 1:00
• I read the list of features that were introduced in each new standard: As I read I smiled an said "aah new feature-a, they took that from Lisp, but a different syntax", and "aah new feature-b, they took that from Lisp, but a different syntax", … In the end my heart sank. I could learn this, but how could I ever hire someone that know it: C++ was already too big, now it is bigger. – ctrl-alt-delor Dec 31 '20 at 23:48
• Well, it has been *cough* decades since I coded Lisp, at uni, but I was thinking "ooh, JS feature envy!" a few times, so I know what you mean (+1). Why bother with promises when you already have callbacks (and Finite State Machines)? Why lambdas, when anything over a 2 or 3 line body is tempting unreadable/unmaintainable code, and anything shorter will be inlined by the compiler? Fortunately, as I mentioned, most company coding standards forbid many of the frills. But, alas, they don't forbid interviewers from asking about them :-( – Mawg says reinstate Monica Jan 2 at 8:41

I had a similar problem 8/9 years ago, but with C++11.

The trick is that there is no trick. You simply sit and use the feature you want to use. Besides that it is also beneficial to know C++14 before getting into C++17 and know C++11 before getting familiar with C++14 features. (Obviously prerequisite for C++11 is C++03/98, but that's already covered by OP).

If getting up-to-date with C++17 (C++20 actually was vote in 2020) I would start with feature list grouped here. The problem is that there are so many of them that one may have problems in how to approach them, thus I've provided an ordered list that shows how I would teach it to people:

## Basic C++11 stuff

• move semantics (overview + SO question) - move semantics and rvalue references are the corner stone of modern C++, what follows is the rule of 5 (or 3/5/0 if being precise)
• auto
• lambda expressions
• ranged for loops - because for(auto const& e: {1, 2, 3}) { std::cout <<e <<'\n'; } is so cool :)
• classes related stuff:
• constexpr specifier
• initializers lists - it is used mainly in std::vector<...> so it's important to know how it works and what are problems involved with them (it is not my favourite C++11 feature)

## C++14 & C++17

• After these basics I would read about the other C++11 related features or moved to C++14 features listed here (and consult C++11 features list when necessary). Note that C++14 was a nice little amendment to C++11 so there aren't many new (and cool) stuff.
• C++17 features worth mentioning (very subjective opinion, at this point you should already know what you want/need to know):

## C++20

• Concepts are the new big thing
• immediate functions
• IMHO modules will be a dead end as long as C++ will be split into header and implementation fiels (besides Rust have better package/modules concept). But that's just an opinion bouncing in my head.
• Remaining C++20 and previous version stuff (obviously only a fraction was covered in this post :)).

I would guess that taking such courses is a gross waste of time unless they are specifically focused on recent additions to C++. Most of the "beginning C++ courses" won't even get you to essential new features.

I haven't followed updates to the language for a long time but first, I think that the "new" language is backward compatible with the "old" language (unlike Python). So, what you need are incremental changes in most things to what you already know.

But I also think that the programming style in modern C++ has changed, depending more on library code than was true in the past. What you need to do is find a way to become comfortable with that newer programming style.

I would think that a book like this one from the very capable Scott Myers would get you started. I don't have the book, but Myers has been trustworthy in the past. Use the ideas there to build something significant.

• I do like Myers, but he has retired form C++. I am not sure why I even asked this, as code, despite being he "be all and end all" is actually the most trivial part of sotware development. Btw, can hands dirty industry guys help you educators? – Mawg says reinstate Monica Dec 29 '20 at 16:49
• @MawgsaysreinstateMonica They help at my institution. They do curricular review with us as part of our long-term planning and oversight. It's very helpful! We also sometimes have professionals come and speak to the students about careers. – Ben I. Dec 29 '20 at 20:45
• Us industry folk can be the problem: Making students learn Java and C++ before they can program. However Lean, test-driven, revision-control, Unix, Free-software, and a few other practices would not go a miss. – ctrl-alt-delor Dec 31 '20 at 23:52