# C.1 — The end?

Congratulations! You made it all the way through the tutorials! Take a moment and give yourself a well-deserved (insert something you enjoy here).

Now, after breathing a long sigh of relief, you’re probably asking the question, “What next?”.

What next?

By this point, you should have a solid understanding of the core C++ language. This sets you up well to continue your learning journey into other adjacent areas. So if there’s something you’re really interested in learning about, now’s a good time to see whether you have enough knowledge to jump into that.

However, for most users, I think there are a few natural next steps.

Data structures and algorithms

If you haven’t already learned about these, this is my strongest recommendation.

A data structure is a collection of data and a well defined set of methods to access or manipulate that data. The most common data structure used in programming is the array, which holds a number of elements of the same type in sequential memory. You can manipulate the data inside an array by using array indexing to directly access (or modify) the elements inside the array. In the lessons, we also covered the stack data structure, which provide push, pop, and top functions to access the data on the stack.

An algorithm is a self-contained set of operations that typically manipulate or calculate outputs from the data in a data structure. For example, when you look through an array to find the median value, you’re executing an algorithm. Binary search is an algorithm to determine if a given value exists in a sorted array. Sorting routines (such as selection sort and bubble sort) are algorithms that sort data sets.

Over the years, mathematicians and computer scientists have come up with a fairly standard set of reusable data structures and algorithms that are useful for constructing more complex programs. These all have various tradeoffs. For example, arrays are fast to access data and sort, but slow to add or remove elements. Linked lists, on the other hand, are slow to access data and sort, but very fast to add or remove elements (if you already know where those elements are).

Why does it matter? Let’s use an analogy. If you were going to build a house, you could build all of your tools from scratch if you wanted. But it would take a long time, and you’d probably mess quite a few things up and have to start over (ever created a hammer? Me neither). Also, if you use the wrong tool for the job, your quality would suffer (try nailing in nails with a wrench).

More likely, you’d go to the local hardware store and buy a few tools: a hammer, a level, a carpenter’s square, etc… and then read some internet tutorials on how to use them properly. These would vastly accelerate your house construction efforts.

Data structures and algorithms serve the same purpose in programming: they are tools that, if you know how to use them, can vastly accelerate how quickly you can get things done at quality.

The good news is that many of these data structures and algorithms have already been implemented in the standard library. You’ve already encountered some of these in the preceding tutorials: std::array, std::vector, std::stack, std::string, and std::sort, to name a few. Learning to use these effectively and appropriately is a great use of your time.

If you’re short on time (or patience), learning how to use the most common data structures and algorithms is the minimum you should do. But if you have the inclination, try recreating those data structures yourself, from scratch. It’s really good practice on writing reusable code, and will help you down the road when something you need isn’t in the standard library. But then throw them out, and use the ones in the standard library. :)

The C++ standard library

The bulk of the C++ standard library is data structures and algorithms. However, the standard library contains other things too, and another next step could be to explore those. Among other things, there are numerics (math) libraries, input/output routines, functions to handle localization and regionalization, regular expressions, threading, and file access. Every new release of C++ (which has been happening about every 3 years now) adds a batch of new functionality into the standard library. It isn’t critical that you know how everything in there works, but it’s worth at least being aware of what exists, so that if you happen upon the need for it, you can go learn more as needed. https://cppreference.com/w/cpp is my go-to reference for discovering what exists.

Graphical applications

In our tutorial series, we developed console applications, because they’re easy, cross-platform, and don’t require installing additional software. Unlike many modern programming languages, C++ does not come with functionality to create application windows, or to populate those windows with graphical elements or graphical user interface widgets (checkboxes, sliders, etc…). To do those things in C++, you’ll need to enlist the help of a 3rd party library.

Getting a graphical application up and running requires a few additional steps. First, you’ll need to actually install the 3rd party library and connect it to your IDE, so you can compile it into your program. Most graphical libraries should come with instructions on how to do this for the most popular IDEs. Next, you need to instantiate an OS window, which requires calling certain function from the toolkit. Most, if not all, of the libraries should have sample programs that you can compile and dissect if you’re not sure how to do something basic.

There are a lot of libraries out there, and which one you should use depends on your requirements (you’ll have to do your own research to determine which one is right for you). Popular choices include Qt, WxWidgets, SDL, and SFML. If you want to do 3d graphics, all of these frameworks support OpenGL, and there are great OpenGL tutorials on the internet.

Graphical applications typically run differently than console applications. With a console application, the program starts executing at the top of main() and then runs sequentially, usually stopping only for user input. Graphical applications also start executing at the top of main(), typically spawn a window, populate it with graphics or widgets, and then go into an infinite loop waiting for the user to interact with the window (via mouse click or keyboard). This infinite loop is called an event loop, and when a click or keypress happens, that event is routed to the function(s) that handle that type of event. This is called event handling. Once the event is handled, the event loop continues to run, waiting for the next bit of user input.

TCP/IP / Network programming (aka. the internets)

These days, it’s pretty rare to find programs that don’t connect to the internet, a back-end server/service, or leverage the cloud in some way. Any program that requires you to have an account and log in is connecting to a server and authenticating a user. Many programs connect to some service to check whether an update is available. Social applications maintain a persistent connection to a social infrastructure, to allow users to communicate with each other on demand. These are examples of networking.

Networking (broadly) is the concept of having your program connect to other programs, either on your machine, or on network-connected machines, to exchange information. Networking is a powerful tool -- in the past, if you wanted to change the behavior of your application, you had to release an application update. Now, with some good program design, you can simply update information on a server somewhere, and all instances of the program can leverage that change.

As with many things C++, there are libraries out there to help make your C++ programs network capable. The Asio C++ library is a commonly used one (there are two variants -- a standalone version, and a version that integrates with Boost, which is a library that provides a lot of different functions, much like the standard library).

All of the programs we’ve seen in this tutorial series run sequentially. One task is completed, then the next one starts. If a task gets stuck (e.g. you’re asking the user for input and they haven’t entered any yet), the whole program pauses. This is fine for simple academic programs, but not so great for actual applications. Imagine if your program couldn’t handle the user clicking on something because it was busy drawing something on the screen, or if the whole program paused/froze when a network call was happening. The program would feel unresponsive.

Fortunately, a method exists to allow programs to execute multiple tasks at the same time. This is called threading. Much like how (most of) you can walk and chew bubble gum at the same time, threading allows a program to “split” its attention and do multiple things in parallel.

For example, some graphical applications (such as web browsers) put the rendering (drawing graphics) portions of the applications on a separate thread, so that updating the screen doesn’t block other things (like accepting user input) while the drawing is happening. Network calls are often done on separate threads, so that if the network call takes a while to resolve, the application doesn’t grind to a halt while its waiting.

Threading is powerful, but it introduces additional complexity, and a lot of room for additional errors. Therefore, I wouldn’t recommend starting here -- but it is a good area to learn about eventually, especially if you want to do complex graphical applications or network programming.

Another option is to spend time improving your understanding of best practices. For this, I highly recommend having a read-through of the CPP Core Guidelines, with an optional delving into the GSL library.

A good bye!

At this point, I’d like to take a moment to thank you for stopping by and reading this tutorial series. I hope you enjoyed your time here and have found this site useful. Special thanks to those of you who have helped keep this website a free resource available to everyone by viewing ads that interest you. Please drop by again!

Good luck (and skill) in your future endeavors, and happy programming! And remember, old programmers never die -- they just go out of scope.

-Alex

PS: If you have any feedback or other suggestions for things to explore next, please mention them in the comment section below.

 No next lesson Index B.3 -- Introduction to C++17

### 366 comments to C.1 — The end?

• Junho

Thanks for all the great works you've done. As Foreigner it helped me a lot to study c++ and made me ready to prepare all the tasks that I have to face from now on...

• yeokaiwei

Hi Alex,
May I request for a page on the topic "C/C++ Traps, Catches and Gotchas (TCG)"?

This will help highlight newbie programmer mistakes.

Reference
http://www.literateprogramming.com/ctraps.pdf

• Alex

That would be a really long article. :)

Did you check out https://www.learncpp.com/cpp-tutorial/common-semantic-errors-in-c/ ?

• yeokaiwei

I have a different version. I started in November 2020.

Back then, it was Chapter7.14 Ellipsis.

I think TCG's are great for fun and trickery =).

It will help to make the lesson different.

• yeokaiwei

Hi Alex,

After learncpp.com, what site do you goto next?

AI -> ??

Graphics -> Khronos Forum for OpenGL and Vulkan

Computer Vision -> ???

OS -> Linux

Hacking/Network Security -> ??

Database Management -> ??

Supercomputing or HPC -> ??

Robotics -> ??

References
https://www.flickr.com/photos/[email protected]/36231833334

• Hi, and I would like to join everyone else in thanking you for this outstanding site - the best C++ tutorial out there!

Could you recommend a good online resource on multithreading?

• Aphamino

Hi!

Massive thanks to you for these tutorials. I appreciate your efforts greatly. I'm sure to come back here to reread different chapters if (and when) I forget something.

• Nihar

Hi Alex & Nascardriver , I really appreciate your efforts and skills to make this amazing tutorial !
Before these tuts I had no proper knowledge of C/Cpp but now I can actually type and run codes with proper understanding! Thanks for such a great site , Keep it up :)

-NIHAR

• Manuel

Alex and nascardriver, thank you very much for these great and highly educational lessons! I've had a wonderful time learning such a useful programming language! Again, thank you very much!

• Koko

Hello!
First off, I'd like to thank the people who participated in any kind of way to create all the content here and the ones who support its existence. Now to my question, how much of a ground have I got covered after I finish all the chapters in here? And also, where should I go next? I am really interested in the "art" of programming and would really like to find a job somewhere in the industry sometime in the future.
P.S. Sorry if the question has been asked before, I just gazed over some of the comments and might have missed something similar.

• nascardriver

Hi!

When you're done with learncpp you'll know the basics of the language. You'll be able to write programs and understand how to implement some of the standard library functions and types.
The next step should be to get familiar with what you learned. Even though the code you're writing won't be ideal, you should know what you can do with what you know before you move on. Get a project going, or participate in an open source project or a project of a friend. You'll learn lots by running into problems or seeing how someone else solved a problem.
After that either dig into the language by reading guidelines, the standard, or references.
Or look into a topic that you're interested in, this doesn't have to be C++ specific. It could be graphical computing, algorithms, file processing, whatever wakes your interest.

Those are mere suggestions, you're free to proceed however you want. There are many ways to learn.

• hello

• nice information

• nice information

• nimo

im not finished now just looking .
i will comment again under this when im finished
wish me luck :D

• happyLOL

Same thing here

• nimo

20 days later and 3 chapters done

• ju5tACoder

Me too

• relzwit

I often go to the end of these tutorials to read the "congrats for struggling through!" and feel good, then go to the beginning to start.
.
.
.
and then finish two lessons max...

• Albert Hendriks

Thanks for this great tutorial. Two feedback items come to mind now.
- In my opinion threads should be part of this tutorial. It seems like all basics that aren't 3rd party are covered, except threads. At least there should be a recommendation for further reading about threading in C/C++?
- I know it's hard to maintain a business while at the same time contributing something to the world like this tutorial does. At least provide a link where we can donate a couple of cups of coffee.

• nascardriver

Hi!

learncpp teaches a small portion of C++, threads are one of many features that aren't covered. C++20 added coroutines, which aren't widely supported yet, and C++2b might add executors and networking. Even if we added lessons for multithreading now, they'd be obsolete or require major reworks in 2 years.
As the "Multithreading" section in this lesson states, threads are complex. They're a hell to debug and I can't imagine the frustration they'd cause for most readers. While I think it would be bad to teach multithreading (At least in its current state) to most beginners, you can give it a shot if you feel like it.

Donations are accepted via PayPal and bitcoin. There's a "Support LearnCpp" link in the menu on the left-hand side. Thank you for your support!

• MASOUD

Thank you, I just finished the tutorial and it was wonderful :)

• Thanks for this great article

• Thank you very much for these awesome tutorials.
This is my second time I am reading a tutorial to learn C++.
The fifst time was in early 2000s when I was a kid. My path took me to other languages and other stuf. When I heared the language has been updated I wanted to learn them but I did not have the time for 6 years now! This site helped me alot it was easy to follow as I knew alot about C++ and programing in general.
I suggest to add multithreading, other new featuers that has not been covered and keeping uptodate with new stuff as they come as soon as your time allows it.

• Thank you very much for these awesome tutorials.
This is my second time I am reading a tutorial to learn C++.
The fifst time was in early 2000s when I was a kid. My path took me to other languages and other stuf. When I heared the language has been updated I wanted to learn them but I did not have the time for 6 years now! This site helped me alot it was easy to follow as I knew alot about C++ and programing in general.
I suggest to add multithreading, other new featuers that has not been covered and keeping uptodate with new stuff as they come as soon as your time allows it.
Thanks again.

• Alif

Just wanted to say thanks for the awesome tutorials. The language being easier to understand than most books helped a lot :D

• koe

@nascardriver, recently I started studying CMake, and found existing educational material below the par of this website. I was thinking about writing up chapters introducing the various concepts (based on so-called Modern CMake, with best practices and so on), and submitting them as an an appendix for LearnCPP. Would you be amenable to that?

You at one time said "I [would] rather focus on improving and updating the existing lessons. Even with the number of lessons we have now, the last few chapters are practically unmaintained." So, I don't want to overload you (and Alex). Also, you have both remarked that CMake is out-of-scope, which I understand!

• nascardriver

Hi koe!

I was thinking about something similar myself tonight, and I'm leaning into the direction of wanting to remove IDE/compiler/build system-specific lessons.

It's certainly convenient for the reader to learn everything they need in a single tutorial, but
- These lessons are outdated on a regular basis due to updates to those applications.
- These lessons are tedious to update, as it requires us to install the latest versions just to take screenshots or figure out where a menu item moved. Some of the applications are OS-specific so I'm not even able to install them without setting up a VM or similar.
- I'm unable to provide support in the comments of those lessons, because I don't use the applications.
- There are probably better tutorials dedicated to these applications. They can explain them better and more detailed than we can or should. Learncpp should be about the language, not installation or configuration instructions.

Rather than having basic instructions for some programs, I'd link to good external tutorials, which is something that could be done for your idea as well.

I use CMake myself, but I don't like using it. Everything feels old and is harder than it should be. I haven't found an equally feature-rich build system generator yet, so I'll stick with CMake and hope Meson keeps growing.

I appreciate your willingness to contribute to learncpp! I'm in no position to make decisions about adding or removing lessons, let's see what @Alex thinks.

• koe

I was able to get through all the tutorials just using the command line, so IDEs are certainly not a requirement (my computer is an old Mac... no good reliable options). The discussion of linking and how executables are constructed is quite useful though.

• I have come by, it's not as dry and arduous as a thick textbook, yet it explains in more detail than a class lecture or an online video series. your excellent explanations and for helping the many users in the comment section learn C++. Thank you NASCAR driver for taking the time to help others and providing sound programming advice. this helped me get some deep intuition and understanding of WHY things are done the way they are in programming, which many websites and even real-life teachers fail to achieve. All in all an awesome series, helped me tremendously since the new teachers this year aren't really any better than the previous ones.

• Choi

First of all, thank you for your tutorials. It's very informative so that I could learn comfortably without phrases comes out of nowhere or ambitious words with special meaning that i could barely fine after searching and fails. It's great tutorial and thank you so much. I've learning cpp stds now with your recommand but I saw that there's no networking functions in cpp but c. If you could, could you recommand the best thing to learn c standard library?

• nascardriver

C doesn't have networking either. I can't recommend any library, poco seems to be popular but I've never used it.

• Choi

I misunderstood the functions as standard. It turns out posix apis that have to use on c style. Thanks for the library. The tutorial seems too hard but also comprehensive decent thing so I'll try to master.

• Ian

Thank you to Alex and Nascardriver so much for writing this tutorial. It is by far the most comprehensive and well done that I have ever seen. It has helped me learn so much. It took me a long time to complete, but I learned a lot of things that I believe will help me in other programming languages too.

Also: I am looking to learn C# next, could you recommend any similar tutorials for C# that you might know of?

• MMM

Hi! I wanted to know if you guys made other websites for other languages such as C#, python, JavaScript ,etc or not?

• Tony Kolarek

Woah, I never thought I'd come to this point in all honesty!

Thank you Nascardriver & Alex for bringing up the best (free!) resource to learn c++. This tutorial is actually very well written, and gets right to the point. I am still surprised how far this website has gone, so congratulations!

I kindly thank you both for your amazing job; both for the website and its structure, and for the help provided to the readers. I honestly really appreciate everything you've done so far.

I don't think I'd have kept studying the language if it wasn't for this website - you guys are pro teachers!

Even though I gave up months ago, when I first started learning c++ (my first programming language after all), I am grateful that I came back some weeks later and re-started the whole thing. I feel like I now have a much better understanding of how things work, but as most people say, you never finish learning c++.

Guess I'm moving to Desktop application now, and hopefully I'll find some good resource just like this one. Once again, I kindly thank you both - nascardriver & Alex - for your amazing job with everything. I'll probably see you soon whenever I have some issues that I cannot overcome, but until that, I hope you do well!!

Tony

• Hi Alex and Nascardriver (Are you two different people?),
I very much enjoyed your course.  I did my first C++ project for work way back in the early 2000's and took a university course, but then my job took me in a different direction and I did not use C++ again until lost my job.  It's amazing how many things have been added to C++ since I first learned it.  Your tutorial is very well done and easy to follow for the most part (my old brain still has trouble with the more advanced template stuff).

Thanks again.  I probably will go through it a second time to take each quiz again for the practice.

Regards,
Digi(lee)

• Ryan

Took me nearly 2 years to get through it, I started at 16 and now I am 18 and I just finished it today. What I might say might sound really cheesy but I went through alot in the last two years and I'm just suprised I'm even here. Programming took my mind from my struggles and took me to something I now enjoy and want to pursue further.

I really tried my best to completely understand the concepts; I made programs and tested stuff for every lesson and researched further.

Thanks alot Alex and NascardDriver for the help and support you gave, words are just not enough. When I get enough money, I'll donate :').

Time for algorithms and data structures then.

• nascardriver

Congratulations on making it all the way to the end! Good to hear you found something you enjoy :)

• Yan Yan Yan

Thank you for making this! I started April 24, and I just finished today. Thank you very much, other tutorials just glossed over some of the functionalities which didn't help much but this actually dived down but not too deep, just at the right level.

• roy

for graphical, why you not mention mocrosoft visual c++

• Songlin

Thank you so much for such a great tutorial! really appreciate!

• baronK

First of all, thank you very much Alex and Nascardriver.

I read through this tutorial several years ago, when I was just learning to code and it helped me immensely on my journey. Now I came
back to brush up some things but as I saw how much new and improved information is given, I ended up reading through it again and enjoying
it very much in the process. Really astounding and the best modern C++ tutorial out there!

As per suggestions on new topics: How do you think about a chapter on Traits, Policies and Template Metaprogramming in general? I think it
would be a good addition for advanced readers, while still being close enough to C++ itself to be included in this tutorial series.

• nascardriver

Hi!

I think type traits/metaprogramming are too advanced for learncpp. As it is now, the lessons take considerable time to finish. People should start working in their own projects as soon as possible to practice the basics. If instead we extend the lessons even further, people will forget what they really need. It's better to have an in-depth understanding of the basics rather that scratching the surface of everything in my opinion.

If by "Policies" you mean execution policies, those are cool, but will likely be deprecated by executors in C++2b. I don't want to risk writing lessons that get removed in 3 years.

I rather focus on improving and updating the existing lessons. Even with the number of lessons we have now, the last few chapters are practically unmaintained.