DEV Community

loading...
Cover image for Resources that help you to delve into C++

Resources that help you to delve into C++

lesleylai profile image Lesley Lai Originally published at lesleylai.info Updated on ・8 min read

During the years, a lot of people ask me for help in learning C++. I am no C++ expert, but as a person who is doing C++ for years, I want to share a bunch of beginner-friendly C++ resources that are known to be of high quality.

When anyone asks me for guidance about getting into C++, I always ask first about their existing experiences. Some people just start to learn programming and decide to learn C++ as their first language, some people have learned a limited amount of C++ and want to learn more, and some of them are already programming veterans in other languages. Depend on your experiences, you probably want to start with different materials, and I try to cater to each of those backgrounds in this post.

One thing I want to mention, though, is that reading books or watching videos all the time is not the best strategy to learn. Whatever stage you are in, it is much easier to learn when you apply ideas into code, so spending time on coding projects helps.

What if I just start learning to program and choose C++ as my first language?

For books, I recommend Bjarne Stroustrup (the creator of C++) 's "Programming: Principles and Practice Using C++ 2nd edition" as a starting point.
The book is thick, so don't feel guilty if you cannot finish the whole book.

If you are more inclined toward tutorial videos,
look at Kate Gregory's Learn to Program with C++. If you join the #include discord server, You can also message her there to get a trial code.

What if I already learned some C++ before and want to delve in deeper?

What if you have some limited C++ experience before? Maybe you already learned some C++ from your university data structure course, or perhaps you followed some online tutorials that use C++. From my personal experiences and what I heard, most university programming courses or those online tutorials teach problematic practices, and the instructors often do not have a good grasp of the language. Thus, "learn from the best materials" is especially important for you to offset prior misconceptions on C++.

For books, I will still recommend either Bjarne Stroustrup's "Programming: Principles and Practice Using C++ 2nd edition". And for video tutorials, you can try Kate Gregory's C++ Fundamentals Including C++ 17.

What if I am a veteran in another language and want to delve into C++?

If you are already a proficient programmer in some other languages and want to delve into C++, you will have a faster pace journey than other learners.

As for book recommendations, Bjarne Stroustrup's "The C++ Programming Language (4th Edition)" was one of the best-written books I ever read, though do notice that this book was written with C++11 and misses some of the later developments. The book is also very thick, so if you want a shorter introduction, try "A Tour of C++ (Second edition)".

I think that I have a decent grasp of C++. What's next?

So you spend months with the above materials and feel that you have a decent grasp of basic C++ concepts.

A sanity check to make sure about your understanding of C++ is whether you are familiar with the following topics, to name a few:

  • how to use const
  • templates
  • references and pointers
  • usage of the standard library, in particular, iterator and algorithms
  • RAII
  • copy and move constructor and assignment
  • move semantics
  • operator overloading
  • lambda expressions and function objects
  • undefined behaviors

Now it is time to put C++ into practical usage. C++ is used for diverse purposes, and using C++ in specific areas is probably more critical than the C++ language itself. It is perhaps also a good time to spend some time on the broader C++ ecosystems, like unit test libraries such as Catch2, build system generators such as CMake, and package managers such as Conan.

Another thing to consider is to start learning another programming language, especially for folks who only know C++ at this point. Good next languages to pick are those very different from C++, for example, dynamically-typed languages such as Javascript, Python, or a Lisp dialect.

That being said, there is still a lot to learn about the C++ language itself. And I will try to list some resources that are still relative up-to-date and I enjoyed:

Books

If you haven't read "The C++ Programming Language (4th Edition)", I would still recommend it. And here is a bunch of other books I would like to recommend:

Some books focus on specific areas of the language, such as:

Conference Videos

Conference videos are also an excellent resource to learn more about C++. They focus on a diversity of topics; many of them are hard to find in books. And they also require low commitment (just spend an hour lunchtime watching some videos)

Here are some of my favorites that are also beginner-friendly:

Communities

Many people in the C++ community and I, am always willing to answer direct messaging questions. However, I, or most people you can contact online, have limited experiences.

To utilize the best wisdom of people, you need to join programming communities, and then you can ask questions in public and get a response from multiple people. 1

Being active in programming communities also has numerous other benefits, including getting job information and having more social support.

#include

#include is a wonderful community to join. Its mission includes providing conference scholarship to people in need, but for most people,
you can join its discord server to hang out and talk about C++.

Local Meetups

Joining North Denver Metro C++ Meetup was one of the best decisions for me during my college years. I understand that it is a hard time to pop into meetups at the time of writing since most of them are currently held online. Nevertheless, I urge you to try to attend some meetups if you have time. Online meetings also provide some advantages compare to physical ones. For example, they require low commitment, and you can choose from all of those meetups worldwide.

Attending Conferences

If you are serious about C++, then conferences are great places to meet like-minded people. Same as meetups, one difficulty at the time of writing is that most C++ conferences are hosted online, but they are still worthwhile to consider. Here are some of the recurring C++ conferences I am aware of:

There is a list of conferences on the ISO C++ website.

Listening to Podcasts

There are a bunch of C++ podcasts, including a few new ones appeared in 2020:

Following Blogs

I use RSS to keep track of the tech blogs, and I highly recommend you try out RSS too.

I follow hundreds of blogs, including C++ and various other topics. Here are some of the best C++ ones that pops into my head:

Do notice that blogs sometimes can talk about very advanced topics.

Twitter

It is your personal preference on whether to join Twitter or not. On the one hand, Twitter is a great platform to directly communicate with the programming communities and know what other people are up to. And personally, Twitter is the platform that I know so many exciting developers worldwide. On the other hand, Twitter has its downside with all the procrastinating and doomscrolling. Some tweets you see can also make you upset. My suggestion is to try Twitter out at least, and you can quit if it doesn't work for you.

Misc resources

Here are some misc resources that are also worth mentioning.
Some of those are great online tools, while others are video series.

  • cppreference should be your go-to site for C++ language and standard library reference, and it is usually a lot more accurate and up-to-date than its alternatives.
  • Compiler Explorer is an online coding environment that supports C++ and a dozen other languages. It can show the compiled assembly of your program and run your program. Unlike most online C++ coding environments, which often ship with an outdated compiler, there are many compilers to choose from in compiler explorer, including the most cutting-edge ones.
  • Quick C++ benchmark is an online tool to perform quick benchmarks on C++.
  • C++ Tips of the week
  • Kate Gregory's STL Algorithms course is a great resource to learn more about and appreciate C++ standard algorithms.
  • C++ Weekly is a Youtube channel on various C++ topics, posted weekly.

References and further reading


  1. Asking questions online is an art, and a poorly phrased question makes people don't know how to respond. Further, people are often too polite to point out that a question is poorly phrased. Kate Gregory's How to ask for C++ coding help is an excellent read on how to ask for help online. 

Discussion (3)

pic
Editor guide
Collapse
Collapse
lesleylai profile image
Lesley Lai Author

Thanks! And of course, I don't mind if you put resources in this post into your repository.

Collapse
sandordargo profile image
Sandor Dargo • Edited

Thanks, by the way, there are no tons of C++ devs on this platform, but I'd certainly recommend following Pierre Gradot, he posts regularly some high-quality articles

pgradot image