Learning programming definitely isn't an overnight thing, and takes a large amount of hard work and dedication (especially with C++). This guide will help you through the process.

Steps

  1. 1
    Learn about C++'s history. The best way to start programming a language is to learn its roots. Even though you may not understand everything that you read, some of these pages will introduce you to important terms that will come up later (such as "Object-Oriented Programming").
  2. 2
    Install a C++ compiler (and possible IDE). A compiler is required for programming in C++, because the actual source code has to be compiled into a file that your computer can run. If you are using Windows a good option would be Visual C++ 2010 Express, or if your using Linux a good one is Geany. Both come with an IDE (integrated development environment) built in, which can make the process of writing source code easier. (NOTE: Many people online will recommend that you use the Bloodshed Dev-C++ IDE and compiler. DON'T. It has not been updated in 5 years and has pages and pages of known bugs, listed here: http://sourceforge.net/p/dev-cpp/bugs/)
    • Learn how to use your IDE efficiently. Some IDEs that are out there have their own individual quirks that could get in the way down the road, so it would be beneficial to read through or keep a reference for the different options and settings of your IDE.
    Advertisement
  3. 3
    Choose a tutorial or two to start learning C++. This step is, along with the compiler, one of the most important steps of all. There are a few things that you have to make sure of during this step. First of all, make sure the guide is written for complete newbies to programming, as those are the most thorough in their descriptions. Next, make sure that the code in the tutorial follows the C++03 standard or even the new C++11 (still not standardized, so beware of compiler issues), because modern compilers will have trouble compiling outdated code, or will just reject it altogether. A few good ones are c programming.com's C++ tutorial and the tutorial at www.cplusplus.com/doc/tutorial/.
  4. 4
    Try out each new concept. An important part of programming is not only reading about the different concepts, but using them in your own code. Copy-pasting the code into your IDE will only go so far. It is much more beneficial to type out each example and even try creating your own program ideas that use the concept being taught to maximize the amount of information retained.
  5. 5
    Learn from other developers. One of the best things about programming is that no matter what level of skill you have in programming, there will always be source code readily available that is at that same level or one step above you. A good way to learn from more complicated source code is to read through until you reach a point which you don't understand, then try to work it out in your head; if you don't know a certain part of the code, read about it in your tutorial or reference material until you do.
  6. 6
    Work through problems using the concepts you have learned. The absolute best way to retain what you learn isn't just writing out source code examples, but actually accomplishing a set task with them. Both c programming.com and Project Euler have good problems that you could try solving to apply concepts in real-life situations. If you absolutely can't create an algorithm for a problem, then as a last resort check online for one done by someone else and learn from it. What's the use of solving a problem if you don't learn from the result?
  7. 7
    Help others who need help. Now that you have learned about C++, you should start helping other newbies online with their problems and get them started on the same journey you had! Don't get frustrated if the person who asked you for help doesn't want to listen to your advice: someone else could learn from the answer you provide even if the original poster didn't.
  8. Advertisement

Community Q&A

  • Question
    How long does it take to learn C++?
    Community Answer
    Community Answer
    It likely differs from person to person, but it could take a few years to learn it correctly and thoroughly.
  • Question
    Can I earn money by just learning C+?
    Community Answer
    Community Answer
    Yes, you can earn money just by learning C++. Many people do it.
  • Question
    How do I study C++ on my phone?
    TheRedEmerald Music
    TheRedEmerald Music
    Community Answer
    There's a great app called SoloLearn that I used to learn programming languages such as C++.
Advertisement

Warnings

  • C and C++ are very low-level programming languages, meaning you have the possibility of crashing your computer with faulty code or with purposefully malicious programs! Make sure NEVER to compile and run programs that have "#include <windows.h>" in them unless you're ABSOLUTELY CERTAIN you know what you are doing, and even if you do know what you are doing, try to avoid it at all costs.
    ⧼thumbs_response⧽
  • Lots of Antivirus will think whatever you make is a virus! Be sure to add your program to exclusions and possibly turn off your Antivirus so your program doesn't get deleted!
    ⧼thumbs_response⧽
  • Make sure your compiler and tutorial are up-to-date! Outdated compilers can lead to valid source code not compiling or weird errors at run-time. The same can be said about tutorials.
    ⧼thumbs_response⧽
Advertisement

About This Article

wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, 27 people, some anonymous, worked to edit and improve it over time. This article has been viewed 330,736 times.
How helpful is this?
Co-authors: 27
Updated: October 30, 2021
Views: 330,736
Advertisement