# How to learn C++?

My background:

1. I have completed the course CS50X which covered C, python, web development, and some data structures in C. I can currently use C, python, and javascript.

2. I want to learn C++ and I want to:

• Contribute to open source projects
• Competitive Programming
• Take part in App development if possible
• Practice, practice, practice. – Michel Billaud Feb 19 at 15:24
• If you have mastered C then your are 5% there. – ctrl-alt-delor Feb 27 at 22:13

So, if you're simply looking to convert the knowledge you already have, web searches like

C++ for C developers

C++ for javascript developers

C++ for python developers

... will get you up to speed.

As a relative beginner, you'll also learn features of the original languages that you didn't know, and get a taste of what sorts of features professional developers find helpful and worthy of discussion. Comparing languages like this is an excellent way of expanding your knowledge of programming languages as a field!

If I were you, I'd also consider searches based on the languages you already have some exposure to:

C for python developers

Python for C developers

C for javascript developers

... and so on.

That's my answer to the question you've directly asked. Before I go, though, I do have one important caveat: your goal shouldn't be to "learn" as many languages as possible. Your goal right now should be to find a home base language that excites you enough that you want to delve deeply into it. Depth is far more valuable than breadth, if only because picking up a new language is relatively easy (as demonstrated by my searches). Honestly, as long as the languages share similar paradigms1, you can translate most of your knowledge of one language to another in roughly an afternoon.

So, by all means go and check out C++! But when you've explored around a little, see if it also ignites your sense of fun and intrigue. If it does, then really take some time to start to learn the language in depth. You might spend a year, maybe a few years, or maybe only a few months before you lose interest. But the goal is to dive deep, and really learn something well. As strange as it sounds, deep diving will ultimately give you a lot more flexibility than more shallow explorations as you learn and develop.

Good luck!

1 - When they don't share paradigms, such as moving from procedural to functional programming, then things become much more interesting, and the process of learning the language is much tougher, though the rewards are also much greater.

What specific open source programs/areas are you interested in? Check their webpages, download the sources and build them yourself, they often list "easy/for beginner" tasks, sniff around their development lists, peek at the bug reporting system. That should give you a better idea of the task you are taking on, and how friendly the community is. Perhaps they have pointers at good tutorials and even are willing to give a hand.

To learn C++, check out CPlusPlus and CPPReference. There are plenty of tutorials around elsewhere, but make sure to grab a new one (the language is still somewhat in flux). Then dig in and create patches for your favorite package. The first ones will probably be rejected or rewritten beyond all recognition by the stewards, but you'll learn a ton by looking at the changes.