Learning C++
This article aims to provide guidance on learning the C++ programming language. In this article, I will try to provide answers to the following questions:
1. What is there to learn with C++?
When we say we want to learn C++, what exactly is there to learn? In the beginning, we should learn the following topics:
While there is much more to learning C++, in the beginning, we should focus on learning about the first three bullet points in this particular order.
1.1. The C++ language basics
Some of the topics that make up the C++ language basics are:
After learning about these topics, we can move on to learning about classes. Some of the topics that make up the C++ classes knowledge base are:
1.2. The C++ Standard Library basics
In the beginning, we should learn about the widely used containers and algorithms in the C++ Standard Library. Some of the containers are:
While learning about C++ Standard Library containers, we should also get familiar with iterators.
When it comes to C++ Standard Library functions (algorithms), some of the more popular ones are:
The C++ Standard Library is a vast universe. And we do not have to learn it all by heart. There are things in the C++ Standard Library that we should learn right away, and there are things we can do without.
1.3. Modern C++ Standards
In the beginning, we should get familiar with notable features introduced in the following C++ standards:
Much of the industry relies on C++14 and C++17, so getting familiar with these standards first makes sense. Please note that there are also C++20 and C++23 standards, but currently, we can put the focus to C++11 to C++17 standards only.
2. What is considered to be Modern C++?
Everything starting with C++11 onwards is considered to be Modern C++. The C++11 standard introduced some groundbreaking features and a new way of thinking. Some of the widely used C++11 features are:
领英推荐
C++11 should be the bottom line for C++ development. As we learn more about C++, we will understand how that translates to C++14 and why companies use at least C++14 standard in their code.
Raw pointers and modern C++
In modern C++, there is a notion that we should completely depart from raw pointers and prefer smart pointers instead. Using raw pointers and new and delete operators in modern C++ is largely discouraged. Ideally, we would not have to learn about raw pointers in C++, but since there is much legacy code C++ left, we should nevertheless become familiar with raw pointers, if only to discourage their use in favor of smart pointers.
3. Where to learn the C++ from?
There are various learning resources, such as:
3.1. Books and online courses
Learning from books is a good way to learn C++, but it is also a path that requires a lot of time. It might take two to four months to establish a solid knowledge base in C++ if you are learning from books. If you are an individual and have plenty of time, a book might be the way to go. If you are a team member in a company looking for a faster way to learn C++, then online courses or live C++ training sessions might be a better solution.
3.2. Live training sessions with a professional C++ trainer
With the help of a C++ trainer, you can achieve in days what would otherwise take you months if you were to learn C++ on your own. There are C++ courses for beginning, intermediate, and advanced levels. They usually last from 3 to 5 days and include the theoretical and practical parts. The 5 days courses also include the source code project with debugging and code review sessions.
4. What are introductory, intermediate and advanced C++ levels?
The above topics roughly fall into the introductory C++.
Once we learn the C++ basics and have a solid C++ knowledge base, we can move to more advanced topics in C++. The following topics fall into intermediate and advanced C++ categories:
What to avoid when learning C++?
When learning C++ independently, it is easy to lose track of which topics are important and which we can do without.
Avoid spending too much time in some dark language corner and losing track of the bigger picture.
We do not have to learn about the entire C++ Standard Library either, but we do need to learn about the prominent features we will use.
Do not learn "C with Classes", learn C++.
Summary
I hope this article is helpful to you and gives you a clearer picture of how to approach learning C++. C++ is a complex language, but as you learn more about it, hopefully, you will start looking at it as a thing of beauty and elegance.
My name is Slobodan Dmitrovic , I am a professional C++ trainer, and I would like to thank you for taking the time to read this article. Please feel free to get in touch with me and let me know your thoughts about learning C++.
#cplusplus #cpp #programming
GoWithAndy
1 年Since I can remember, I've always admired C++. As a result, I've accumulated numerous books on the subject. However, due to the substantial size of my C++ printed library, I lacked certainty about where to start. Consequently, I would only delve into C++ programming when necessary. I did so with unspoken pleasure. Yet, upon returning to the code after some time, I found myself shocked and confused about the functionality of various elements. I recognize that every language can be mastered and memorized, allowing one to read and understand not only their own code but also others'. The key concept is to use it regularly, not just intermittently. I perceive this article as a solid plan to follow step by step, facilitating the study of new concepts or revisiting forgotten ones. I greatly appreciate it. Cheers!
Data Scientist. Physicist. Entrepreneur. Python Developer.
1 年Thanks for sharing, I find your article very helpful!