0.1 — Introduction to these tutorials


Welcome to the Learn C++ tutorials! Above all else, these tutorials aim to make learning C++ easy.

Unlike many other sites and books, these tutorials don’t assume you have any prior programming experience. We’ll teach you everything you need to know as you progress, with lots of examples along the way.

Whether you’re interested in learning C++ as a hobby or for professional development, you’re in the right place!

Tutorial structure

The tutorials in this introductory chapter are aimed at giving you some context around what C++ is, how it came about, how programs work, and what software you need to install to create your own programs. You’ll even write your own first program. Further chapters will explore different parts of the C++ language. In the first chapter (chapter 1), you’ll get a broad but shallow overview of many fundamental C++ concepts, so we can start writing some simple programs. Further chapters will explore those concepts in depth, or introduce new concepts.

Each chapter has a general theme, with all of the sections underneath it being related to that theme. There is no suggested amount of time that you should spend with each lesson or chapter; progress through the material at a pace that is comfortable for you.


Before we get started, lets hit on a couple of important goals of these tutorials:

  • Cover programming topics as well as C++. Traditional textbooks do a pretty good job of teaching the basics of a given programming language, but they often do not cover relevant programming topics that are incidental to the language. For example, books will omit sections on programming style, common pitfalls, debugging, good/bad programming practices, and testing. Consequently, by the time you finish the book, you understand how to program in a language, but you have a ton of bad habits that will come back to bite you later! One of the goals of these tutorials is to make sure that all of these incidental topics are covered along the way, in the sections where it naturally makes sense to discuss them. When you finish, you will not only know how to program in C++, you will know how NOT to program in C++, which is arguably as important.
  • Provide a lot of examples. Most people learn as much or more from following the examples as they do from reading the text. This tutorial will endeavor to provide plenty of clear, concise examples to show how to apply the concepts you are learning. We will also avoid (as much as possible) the twin evils: the magic hand wave (also known as …), where in the interest of space part of an example is omitted, and the unexplained new concept, where a new concept that is integral to the example is introduced without any mention of what it is or how it works. Both of these tend to lead to getting stuck.
  • Provide practice programs. The end of many lessons and sections will contain some exercises that you can attempt to answer on your own, along with solutions. You can compare your solution against ours to see what we did differently, or, if you get stuck, how we solved the problem. Then you can go back and refocus on the areas you need more work on.
  • Most importantly: have fun. Programming can be a lot of fun, and if you’re not generally having fun, you’re not in the right mindset to be programming. Tired or unhappy programmers make mistakes, and debugging code tends to take much longer than writing it correctly in the first place! Often you can save yourself some time by going to bed, getting a good night’s sleep, and coming back to a problem in the morning.

Getting the most out of these tutorials

As you go through these tutorials, we recommend a number of practices to maximize your learning experience:

  • Type in the examples by hand and compile them yourself. Do not copy and paste them! This will help you learn where you commonly make errors, as well as becoming familiar with compiler warnings and errors. As you type in the examples, think about why each of the things you are typing in make sense.
  • As you make mistakes or find bugs in your program, fix them. Try to solve your own problems before asking others for help.
  • Experiment with the examples. Change numbers and text to see what happens. Modify the programs to do additional things (e.g. if a program adds two numbers, make it add three numbers). Try to find different ways to break the programs (if a program asks for user input, try a variety of different inputs). You’ll learn as much from modifying the examples as you will by following them.
  • Write your own short programs using the concepts you have learned. Nothing is better than practice.
  • Learn to debug your programs when they don’t work. This is critical to solving your own problems, and is a skill that many new programmers skip to their detriment. We’ll have more information on how to do this in a future lesson.

Note: The majority of the examples in the tutorials are full programs that you can compile and run yourself. However, occasionally the examples will be “snippets” of code that are designed to quickly illustrate a concept. Because these aren’t full programs, they won’t compile without some additional work. You can turn these into full programs yourself, if you desire.

Is there a PDF version of this site available for offline viewing?

Unfortunately, there is not. The site is able to stay free for everyone because we’re ad-sponsored -- that model simply doesn’t work in PDF format. You are welcome to convert pages from this website into PDF (or any other) format for your own private use, so long as you do not distribute them.

These tutorials were written in 2007. Are they still relevant?

Yes, absolutely. C++ doesn’t change very often, and these tutorials have been largely kept up to date.

What should I do if I get stuck?

If you don’t understand something, read through the comments. Other readers may have encountered similar challenges. Second, try scanning through the next lesson in the series -- your question may be answered there. Third, use a search engine (we recommend Google) to see if your question (or error message) has been addressed elsewhere. Fourth, ask your question on a site that is designed for programming Q&A, like Stack Overflow.

If all else fails, skip the material you don’t understand, and come back to it when needed. You may find that something that was hard to understand is easier with the additional knowledge and context provided by other articles.

Alright, let’s get on with it!

0.2 -- Introduction to programming languages
No Previous Lesson

266 comments to 0.1 — Introduction to these tutorials

  • Hello, can I make Polish translation of your tutorials?

  • nikos-13

    Hey Alex! I found this challenge in the internet : "Make a program that takes first name, last name, and birth year, month, date and stores it to a .txt file." I know some things from your tutorials, but what about the .txt file? Is is something that we will cover to these tutorials?

    • Alex

      I cover text files in chapter 18. However, just because it’s in chapter 18 doesn’t mean you need to read everything between here and there to use that functionality.

      • nikos-13

        So i can just ignore some chapters? Are there chapters that i must read in order to understand the others?

        • Alex

          Most chapters are mandatory reading (as later chapters tend to build on earlier chapters). The ones that are optional reading generally have a note in the first paragraph indicating they can be skipped.

  • amir

    Really nice place you created here! Thank you very much Alex. 🙂

  • AMG

    You made a great job, and it’s truly amazing you keep answering to everybody. For your readers, I would highly recommend to read all comments and questions after each section, and try to answer them. Without any doubts, this site is one of the best source for self learners.

  • Keith

    I don’t want to pay for Google services so I would like free no inserted into my account

    • Alex

      I’m not sure what you mean. Google search is free to everyone, and it’s a great resource to turn to when you’re stuck on a particular problem. In almost all cases, someone else has encountered the same problem that you’re having, and someone else has solved it. 🙂

  • Hello

    Thank you Alex for free knowledge.
    I am so grateful for this

  • Nouman Ahmed

    i cannot find tutorial on this page?

    • Alex

      At the end of each lesson, there is a link to the next lesson in the series. You can also access them directly from the site’s main page.

  • I really want to learn C++ and can create my own programs. This tutorial will useful for me. Thanks for sharing!

  • Peter (something-something) :)


    I know that this website is ment for C++, but if you can, I would love if you could help me with C.
    I have a problem with a code, and have not been able to find any answers. If you could help, it would be awesome! 😀

  • Hi

    Thank you very much for CPP lessons,

    I have used your lessons to develop my arduino encoder reader progrem


  • My dear c++ Teacher,
    Please let me express my suspicion that Google read our messages here, so we have to do what should do, performing the law of silence.
    With regards and friendship.

  • Don jose

    Hi Alex,

    I am trying to find linked list chapter in your tutorials, can you please help me to find that chapter

    If not available in your tutorials, please suggest me some good links for understands the concept in depth

    Your tutorials are very simple, effective and easy to remember, that’s why I always try to find things here

    • Alex

      I don’t have a linked list tutorial yet. I’m hoping to get around to writing one in the next few months, after I finish up the chapter on move semantics. I’m not aware of a good tutorial elsewhere, mainly because I haven’t looked.

      • Don jose

        Thanks Alex for your quick replay, I keep eye here to see Linked list tutorials. In the mean time I try to understand the concept however I want to understand from your way of presentation

  • Matheus

    Thank you for this tutorial. Best C++ programming tutorial ever. =)

  • My dear c++ Teacher,
    Please let me say that in municipal Library of Mauriac (France) where I spent last 4 days ads where not visible and also when I did click on [Post Comment] for send you message, output was:
    You do not have permission to access this document.
    Web Server at"
    Here in municipal Library of Neuvic en Corrèze (France) ads were visible and did click on them till disappeared. In some municipal Libraries I get same "Forbidden" message.
    With regards and friendship.

  • My dear c++ Teacher,
    Please let me say, in municipal Library (Bibliothèque municipale) of Riom es Montagne (France), where I’m just now, I did some 10 clicks on adds of your site and then disappeared. I hope this message be sent at your address.
    With regards and friendship.

  • My dear c++ Teacher,
    Please let me say that in municipal Library of the town Saint Flour, France, where I spent last 3 days, I tried send you comment but after have clicked [Post Comment] I seen on screen "Forbidden access at". I have met similar problem in other towns municipal Libraries. Now here in "Office de Tourisme" of the town Riom es Montagne, I hope this message be sent at your address.
    On the other "hand" at Saint Flour I did many clicks on adds of your site and never disappeared, but here after have clicked 3-4 adds, they disappeared as is the usual case.
    With regards and friendship.

  • Abheet

    Disabled add-block, just to support you!
    This website is an excellent beginner spot.

    Thanks a lot for constantly updating this website.
    Keep it up 🙂

    • My dear c++ Teacher,
      Please let me say Mr. Abheet that disabled add-block does not support Teacher. Clicks on adds support, and it’s easy. Normally, after 10-15 clicks, they disappear. Indeed you should wait till ad’s URL be visible, that is done in 1-2 seconds. So you should only spent half minute for support Teacher.
      With regards and friendship.

  • My dear c++ Teacher,
    Please let me say that I have seen that my message few minutes ago is accepted by your server, so I send present message on that you say: "The best and fastest place to get answers to your questions is on a site designed for programming questions and answers, like Stack Overflow.".
    I sent them question about Mr Bjarne Stroustrup book "The C++ Programming Language" where he defines function sqrt() although it is standard. See at
    Administrators put it on hold and eventually closed it, claiming it is "primarily opinion-based". But every answer is primarily opinion-based.
    Indeed two Gentlemen answered and two others commented it.
    Then, do you suggest me continue ask them questions?
    With regards and friendship.

  • I think it is right place to start learning c++ again after many years. Thanks

  • Stephane

    I am a programmer because I saw this website.

  • Lalit

    Beautifully explained and written.  The best approach to learn c++ i have seen so far, simple and powerful. I was trying to explain some concepts to a learner of c++ and landed here. I appreciated the style of explaining and i myself got hooked. Awesome.

  • vimanyu

    Excellent site thank you so much for this… Going to start today 🙂
    BTW I don’t see any ads on this website buy it says that its ad sponsered??

  • Alex

    Keep reading. Free C++ programs are covered later in this chapter.

  • I love it so much that I have to buy it

  • mrcdog

    A+ job Alex. Brand new to C++. When I learned Python, I strictly used IDLE for my GUI. What do you recommend for C++?

  • keerthanan

    i’ll give my best

  • I am interested in computer and my age is 13. I like this course. I will read read each part everyday. I will help me to understand it easily and quickly

  • Yeyy

    Im gona start without any prior knowledge about coding language hope this helps…

  • Philip Dempster

    I must say… this first article is very inspiring! I’m taking an introductory programming class in C++ next semester and I’m a bit nervous, but I have faith that these tutorials will help pull me through 😀 Thank you so much!

  • I want to learn it.

    Want to program some softwares for my own web projects.

  • Leander

    This seems almost too good to be true. It’s like you read my mind regarding the frustrations of using regular tutorials and guides. Looking forward to using these resources and donating eventually.

  • Hmm, it looks like I just hit the motherlode of C++ tutorials. Yay!

  • Gorador

    I’m gonna make a game

  • My dear Teacher,
    Please let me say I can’t understand what is moved and where from 1.4c, 1.4d and 1.8a.
    With regards and friendship.

    • Alex

      I flipped the order of 1c and 1d.

      I moved the content about the std namespace out of 1.3a to 1.8a.
      I moved the content about using statements out of 1.3a to 4.3c.

      You shouldn’t need to go back and re-read anything you’ve already read.

  • qalbe Ali

    very good site i really appreciate, it give us opportunities to be a good programmer.

  • Vai

    Looks like a good guide for someone who wants to learn how to program in C++ and learn good techniques along the way. Thanks for the tutorial. Hope to finish it all in 5-6 months!

  • Mr Alex,
    Please let me again express my sincere gratitude for your C++ tutorial, and make a comment.
    In the topic "Goals" > "Most importantly", you state "… to be programming". Because english is my second language, and besides learning cpp, I’m interested to improve my english, please permit me say that according to my english, you should write either "to be programmer" or "to do programming".

    • First and foremost, I want to say that I am not a professional linguist in any form, so if someone more qualified can give a better explanation, please do.

      That being said, OP’s (Alex) grammar is correct. In the context that it is being used ("Programming can be a lot of fun, and if you’re not generally having fun, you’re not in the right mindset to be programming") "programming" is a verb in the present tense. It is similar to other present-tense verbs such as to "…to be driving" or "…to be jumping." Other acceptable ways to phrase it would be "…to program," "…to drive" or "…to jump." In those cases, the word in question (program, drive, jump) is being used as a noun instead of a verb.

      Like I said, this is probably not the most comprehensive explanation, but I just though I should try and help. Good luck 🙂

      • Mr Layne Harris,
        Please accept my many thanks for you replied my comment and many more for your helpful linguistic information. It really improves my english.
        With regards and friendship.
        P.S. I’m Greek living in France. G.T.

  • dontletmegetme

    I’ll see if it works, but it looks very promising.

  • Bm

    Great tutorials but a little hard to read. I would love to see a colour change or a dark theme introduced.

  • Vedansh

    Seems Intresting! I’ll start right away!

  • Ashoka

    Thanks Alex for this wonderful site, Now I am re-starting to read and practice exercises in detail 🙂

  • uay

    thanks for this site.. i will start!

  • UKImperium

    Great introduction. I’m really looking forward to getting into coding. I have a brother who learned himself how to code C/C++. He’s been doing it for a few years now so lucky for me I’ll have some help.

  • Nick

    Thanx for this tutorial, but i can’t understand why you don’t use "using namespace std;"? It makes the code shorter and increase the speed of coding. Isn’t it?

  • Sammi

    Hey Alex!

    I’ve seen a lot of people commenting on how this is great for beginners, but what about people who have taken a few c++ programming classes in college but didn’t quite learn everything?

    • Alex

      The tutorial series should definitely be good for those kinds of users too. I guarantee you’ll learn something new. You can skim the stuff you already know well, and focus in on the topics you’re weaker on.

  • Tsubaki

    Hi Alex,
    Is this tutorial up to date? I mean as a beginner, can I use it to learn C++ from scratch, considering that we’re in August 2016?
    Because some people told me to be careful about where I start to learn C++ from, since a lot of tutorials are obsolete and C++ is changing every day!

    • Alex

      Yes, it’s largely up to date. I’m still in the process of integrating some additional C++11/14 stuff into chapters 12 and beyond, but that shouldn’t impede your progress or waste your time as the stuff that’s there is still relevant.

  • Mal Jones

    Hi Alex,

    Do you have any plan to release a "paid for" version of the tutorial that could be used off-line?

    • Alex

      Not at this time. The content of this site gets updated several times a week, so an offline version would go stale pretty quickly.

  • SAAZ

    hi Alex, after am through with your tutorials, how do i implement it in writing windows programs?

    • Alex

      After you are through with these tutorials, in order to create Windows programs, you’ll want to pick an appropriate GUI framework and leverage that. The framework will assist with creating windows and form elements, and the code you learn here will provide the logic that glues everything together. Which framework you choose is entirely your choice.

  • SAAZ

    Hi alex, is there any need for me to write any certification examination as a means to show that i am versatile in c++.

    • Alex

      I’m not sure what you mean. Can you restate what you’re asking?

      • Ryan

        Hi Alex, Think what hes trying to ask is, Will he need to write and pass an exam so that he can show hes a certified C++ programmer like Java and the Sun exam.

        • Alex

          That depends on his employers requirements. Some employers like to see that kind of thing, especially if you have no work history or college degree. Otherwise, how do they know how well you understand this stuff?

  • easybtc

    Excellent.. i was just thinking in the morning to learn this programe to code some coin related games and if possible to develop a coins.. excellent.. now i got a good beginning…

  • Niko Gill

    This website is great! I love how much detail was put into it and that it does not require background knowledge of other programming languages to understand. Thank you! 🙂

    • Alex

      That’s the point of the site! To explain C++ in a way that doesn’t require prior knowledge of anything except the English language and basic logic.

      • tzkang

        Haha,"Eecept the english language", I agree with it, because i am a Chinese, my english is poor. But I think this website is great.  
            I have learned something about C++ from "C++ Primer (5th Edition)",but I not good at C++ yet.
            I hope this website can help me to imporve my C++ skil as well as my english skill.

  • Sarah

    Hey Alex
    I started C++ course a month ago and I’ve been attending these classes, the teacher just lecture us about different stuff and programs and barely ask us to write things and then gives us some homework.

    I can’t do those home works at all because I’ve never done programming, and I have no idea what’s going on. Your tutorial is amazing but it can’t help me since I can’t spend much time on it.

    What do you suggest? How can I learn this?

    P.S: I"m very frustrated at the moment

    • Alex

      Given your time constraint, I suggest you read the lessons related to the topics your professor is covering to reinforce your knowledge.

      Outside of that, maybe get a tutor who can work with you 1:1 to maximize your time investment to output ratio.

  • Earnest Achayo

    Hello everyone, am a fresh beginner in learning programming and am looking for a programming friend who i can always ask some programming issues when i get stuck somewhere in between the coding lines please drop me a mail @ if you are one please. I will highly appreciate.

  • Hey Alex ! You’re Awesome ! I’m very glad to finish this tutorial and very helpfull thank you for a lot !! 🙂 i have a question , Can i translate this tutorial to my native language , with your permission ? 🙂 Thank you so much again.

  • Brandon

    You are a scholar and a gent.  What is sad is I have gone to college (a bad one, but a college), purchase Udemy classes, paid tutors, and nothing has been as helpful as your site for the one factor, you break it down as though a child was learning this, provide tangible and practical examples.  You sir, are a light in our dark times of overpriced education.  Thank you for your generosity and for giving back to the community.

  • Irshan

    Thank you dude for this great site….. It is helping me a lot… Is there any option to make a donation?

  • Michael

    Thank you for this site. I have been working through the lessons and it is helping me alot.

  • igor

    Very clear and understandable content. Thank you for a great job!

  • you site is very useful … Thanks to the team who brought up the whole idea

  • Trebor

    Thank you for this awesome tutorial. With the help of this tutorial I’ll be able to do my first program. It will be able to understand human language, program, and ultimately get over the world.

  • DrYitMat

    Thank you for creating this site and these wonderful tutorials!

  • LebiTheCoder

    To my fellow readers/students on this wonderful tutorial: Can we have atleast dedicate half an hour (if possible, more than half an hour) to just click those ADS repeatedly? Just you know, close the windows that pop-up afterwards. In this little way (educate me if this is wrong) we can help Alex in maintaining this awesome site. I believe every click on those ADS generate some revenue. Thank you folks! (Just delete this comment if this is not a good idea ☺☺☺) PS: I don’t know if by clicking those ADS, you encounter malware or dangerous whatsoever.

    • Alex

      Please don’t spam click the ads. 🙂 However, if you see an ad that looks interesting, by all means, go explore.

      • My dear c++ Teacher,
        Please forgive me for I did click ads repeatedly. I was not aware of your suggestion. I respect it and stop click on ads, for, to say true, I do not see any one that looks interesting by any means.
        With regards and friendship.

  • Ishtmeet Singh

    Hello Sir Alex,
    I’ve been browsing on to your tutorials for few hours and I am glad that I found your website, and reading these appreciation comments made me use ONLY your tutorials to study C++, and I’ve stopped using Ad-Blocks for a bit now, as I will only be browsing internet to read your tutorials, that might help me pay for your effort, a bit. But, I have few questions in my mind, I hope you would answer me whenever you have the time to do so:
    1. I am semi-beginner in C++, means I have basic understanding of this language. I want to know, if I start reading these tutorials in detail, will I have any problems understanding the codes in the later sections?
    2. At the end of these tutorials, will I be able to write almost any program in C++?
    3. Are these tutorials meant for beginners(People having no knowledge about this language), or the ones who have a bit understanding about any other programming language like C?
    4. Is C++ linked with C? Means, do I have to learn simple C language before starting C++?
    That’s it sir. I know these questions may be silly, but I would call them "DOUBTS".
    Thanks in advance, and once again AMAZING work, Alex!

    • Alex

      1) The tutorials are set up so you learn everything you need to know in order. If you skip sections, you may run across concepts that you skipped. If you read them in order, you should have no problems (assuming you understand the material)
      2) No, not any program. This tutorial teaches the C++ core language functionality. There’s still other things you’ll probably want to know about: the classes in the standard library, data structures and algorithms, user interfaces, etc…
      3) These tutorials are meant for both. The tutorials are written assuming you have no background in programming -- however, if you do, you’ll find the material easier. And I almost guarantee you’ll learn some things you didn’t know.
      4) C++ is linked to C, in that C++ branched from C at some point in the past. You do not need to learn C before C++, and I would not recommend doing so.

      • Jatin Sharma

        Hey Alex my name is Jatin Sharma. I want to know how would C++ help me and what kinda applications are there?

        • Alex

          C++ would help you if you want to learn to write high-performance, memory intensive, and/or real-time applications. C++ is great for video games and simulations, and is used in finance, engineering, transportation, physics, and many other industries.

          If you’re not sure whether C++ is right for you, that’s okay. I suggest Googling, “What is C++ good at?” and reading some more about what it can do.

  • thanx Alex,this is a great site .

    //keep coding 🙂
    using namespace std;
    int main()
    if(cout<<"hello world to bye bye world(begineer to expert :)")
    return 0;

  • Sharaf

    first of all i thank alex for his wonderful work even i have not completed the tutorials but they are really wonderful!!! i am a school guy who got less score in computer science last time but i hope that my score will increase because now i started understanding what things are!

  • ThePlumBOB179

    Hello! I’m SO excited to start programing. I’ve turned off my AdBlocker for this website, as I have no doubt you guys have done an awesome job! SEE YOU ON THE OTHER SIDE 😀 😀 😀 😀 😀 😀 😀 😀 😀

  • Goatflakes

    Thanks! You should try and get this published as a paper and ebook through a publisher!

    One small bone to pick though. I have been programming for decades, so I’m over the "we don’t assume you have any previous programming knowledge" approach. It makes it tedious to quickly get up to speed with a new language or framework.

    I personally was looking for a way of getting from the old style C++ with templates to the newer C++ 01/07/11/14 way of doing things. So I’m kind of sick of seeing how to do if statements… But not your fault, you have your target audience, and I’m not really in it.

    Maybe something like "If you have had previous programming experience, click here. If you have some experience with C++ click here. If you have previous experience with C++ and understand the STL, click here. If you want to understand the difference between C++ 01 and C++ 07 click here" would help?

    • Alex

      Yep, you’re just not the target audience for this tutorial. I suppose it might make sense to have an index linking to pages where things have changed in C++11/14. I’ll add it to my to do to investigate.

  • Raman

    Please write some tutorials on how to create gui application in c++

    • Alex

      I might in the future, but it’s worth noting that C++ doesn’t include any GUI functionality as part of the core C++ language. That means we have to turn to 3rd party libraries for this functionality -- and there are many of those, each with their own strengths and weaknesses.

      • Goatflakes

        Yeah, I kind of wish that Bjarne Stroustrup would put a decent framework into the C++ standard, but I really do understand why he doesn’t. GUIs are _still_ rapidly diverging, c. 30 years after what seemed at the time to be the canonical approach (WIMP) was well understood. Also, it’s a very political thing to do.

        PS: Also WTF Bjarne Stroustrup’s day job is a managing director at Morgan Stanley. I found this when I searched his name to make sure I had spelt it correctly.

  • batman_ironman

    Este exact site-ul pe care îl căutam! Deocamdată știu să programez în c# pentru jocuri in programul Unity 3D, dar cred că dacă o să știu să programez în c++ o să mă ajute foarte mult în c#. Oricum este foarte bun site-ul ca să înveți c++.<<endl
    Thanks a bunch for this free website! I’ve been trying to go through a whole bunch of sites, apps, and books to learn this stuff, but this one seems promising. But the thing is, I’m not 100% sure if this is what I need for the program I plan to make. I know C++ is very powerful but I still never know. (I’m around 90% sure by the way).
    So my question is, "Can you make a "game" similar to Nested by Orteil with C++?" With the new universe each time thing and there’s an infinite amount of things in it?
    Also, being a beginner, I’m having trouble imagining how something like Nested can be programmed and I hope this site gives me the tools to be able to make exactly what I want.\
    I disabled my add-blocker to support the site. Also I’m working as software engineer but I never had enough consistency to thoroughly work trough similar guides. I’ve always learnt as I go. Since I’m currently working on a service that is developed in C++/Qt I felt that I’d like to have better grips and understanding why and how are things working in that world as they are. Also I’ll promise to donate if I’ll be able to work that guide trough.


    • Alex

      You could definitely write something similar to Nested, though with C++ you’d be better off doing so as an application instead of a web page since C++ isn’t a web technology.

  • Jorge Calderon

    Thank you. I really appreciate your efforts. This is exactly what I needed and it’s free.

  • Luke

    Looks promising. I’m going in!

  • dan

    this tutorial is awesome !!

  • Este exact site-ul pe care îl căutam! Deocamdată știu să programez în c# pentru jocuri in programul Unity 3D, dar cred că dacă o să știu să programez în c++ o să mă ajute foarte mult în c#. Oricum este foarte bun site-ul ca să înveți c++.

  • Lite3000

    Thanks a bunch for this free website! I’ve been trying to go through a whole bunch of sites, apps, and books to learn this stuff, but this one seems promising. But the thing is, I’m not 100% sure if this is what I need for the program I plan to make. I know C++ is very powerful but I still never know. (I’m around 90% sure by the way).
    So my question is, "Can you make a "game" similar to Nested by Orteil with C++?" With the new universe each time thing and there’s an infinite amount of things in it?
    Also, being a beginner, I’m having trouble imagining how something like Nested can be programmed and I hope this site gives me the tools to be able to make exactly what I want.

    • Alex

      It looks like Nested was written in Javascript. See:

      You could certainly create a client-version of this in C++, but if you wanted it to be web-accessible you’d probably be better off using another language.

  • Wira267

    This might seem like a very dumb thing to ask, but I wanted to ask how long it would take me to get through all of this tutorial if I spend 15hours per week on it? Please, reply.

    • Alex

      That very much depends on how quickly you read and absorb the information. My advice would be to work through chapter 1, and track how long it takes you to get through each lesson. If you calculate an average time per lesson, you could project how long it would take you to do all of the lessons.

  • I am beginner please help me out as i am interested in Learning this language

  • Speedy1101

    I know some batch so I’ll think I’ll enjoy it.

  • Patrick

    Great! This is exactly what I am looking for!

  • Carl Sun

    I’m going to learn C++ by this great website, and I think BROKEN WINDOW’s advice is very useful,it’s better that people’s comments not be in end of pages

  • Hello Alex,

    Thanks for sharing you knowledge of C++. This website has been really helpful!


    I have a suggest for this great site.
    I think it’s better that people’s comments not to be in the end of pages.
    they can open in new tab or a new window . it’s too better and it can prove speed of loading pages.
    I mean it’s better to separate tutorials from comments.

  • Please add Google translator to your website so all user can get benefit from your website,
    At last this is good/educational website

  • Cristianokabin

    This is a awesome site……can I download this alex

  • it is exactly that I need, grateful !

  • 蛋糕

  • Syed

    Thanks for the update!

  • Bimal thakurathi

    Thank you for the great free site..

    Surely will tell my friends

  • This site full of information
    Thank you very much Alex

  • David

    This site looks really great so far!
    Good for beginners, like myself!

    Hey, Alex, do you ever think you’ll create more websites for different languages?(i.e.,,,, and so on)

    Have a great day, and as always, thanks for the wonderful tutorials!

    • Alex

      Nope. I don’t know any of those other languages well enough to teach them. I’d like to eventually do programming-agnostic topics, such as algorithms and data structures.

  • Mikel

    Thank you very much for the tutorials!

  • I love coding. Tnx For
    sharing it. I am a new Learner .From now I start learning c++.Hope I will learn easily from this site.

  • Tnx For this. I am a new Learner .From now I start learning c++.Hope I will learn easily from this site

  • Exactly what I’ve been looking for,… I’ve been into 3D graphics for some time now. With the programming knowledge I’ll get from this site and my 3D experience, I can’t wait to produce my first 3D game 🙂

  • Don Rico

    I disabled my add-blocker to support the site. Also I’m working as software engineer but I never had enough consistency to thoroughly work trough similar guides. I’ve always learnt as I go. Since I’m currently working on a service that is developed in C++/Qt I felt that I’d like to have better grips and understanding why and how are things working in that world as they are. Also I’ll promise to donate if I’ll be able to work that guide trough.

  • yas

    Just wanted to say thank you very much for creating this website.

  • Mahesh

    This site is really good for beginner. Provided more depth explanation of each and every concepts.

  • Timotheus K

    This website looks nice, thanks!

  • W.N. Tun

    This is exactly what I’m looking for !!!!
    Thank you all !!

  • Nicolas

    This sounds like the perfect resource for a beginner like me. I’ve always been fascinated by programmers, and what they can do with words. I plan on making full use of this site, so thanks so much in advance!

  • Aleyab

    is there anyway to download all of these tutorials same time as a .pdf file maybe cuz printing them will take a long time i think 😀

  • SM.link99

    Hi Alex,

    Just wanted to say I feel the clarity of the words and the website contribute tremendously to the learning experience, and I am grateful that the site is free. Thanks a ton.

  • Thorax

    Hi Alex. This may seem like a silly request. But is there any chance you could have the ad on the right hand side moved to say… the top, or the left hand side?

    I tend to tile my browser and IDE vertically, but due to the add on the right it makes it pretty awkward as it compresses the rest of the page.

    Not a major issue 🙂 But it would be nice. Either way, really enjoying the tutorials so far and I really appreciate the work you’ve put into this. Can’t thank you enough!

  • jakob d

    here goes nothing!!

  • Bernard Collins

    I have made several attempts to learn C++. But I don’t give up easily. Here goes another try.

  • epicme301


  • Im a huge gamer and so are my friends. were gerks (geeks aka gamers, and nerds aka know it alls) but im the only gerk learning code for for a game idea so thank you for this site

  • ansy

    oh hope it helps me get my exams, nice work 🙂

  • Yiu’re gonna save me!!! 🙂

  • Sravanthi

    Thank you so much Alex, really this is the best site which i have come across so far. Keep up good work!!

  • Nayana

    Awesome site!! I am glad I found this 🙂 Thanks so much Alex !! Keep up your good work 🙂

  • Wow! I must admit that this is a fantastic site for the beginners to learn C++. Though i’m not a beginner. i recommend others to this awesome site to quench their thirst for this particular language.
    Thank you so much, Alex for your tremendous effort in simplifying this work for the beginners. I wish i’d found this useful link earlier to simplified my work which took me a couple of time to learn it since my "Structured & Object-Oriented Programming lecturer" wasn’t always ready to give us the adequate information but only referred us to books for further information.
    Hence appreciating you for your work.

    Thanks in advance.

    A South Sudanese expatriates scholar to Kenya.

  • Phill Wilbor

    very good website and its free..i just want to say thank you for this awesome site!

  • Long Ngo

    I really do not understand why my current C++ Programming Professor cannot explain things this simple in his "textbook", which is made up of 4 different C++ textbooks written by different people in which he putted together. Amazing site, keep up the good work. You guys get straight to the point instead of going in an endless loop of fillers and complex words and analogies.

  • Fahad

    I`ll try Insha Allah!

  • Batuhan

    great site thank you for your efforts to make these tutorials…

  • Thanks,
    I came here to refresh my C++ knowledge.

  • Uttam Prakash Manher

    fantastic, I like this website. This is the best website to learn C++ but there any version of this webpage for 320×240 screen resolution with no javescript (for Micromax X351 mobile)?

  • Bob

    Has C++11 best practices been updated throughout or just added at the end?  What does updated mean on the main page? .1 says updated, but the date inside says 2007.


  • Ravi kiran

    its pretty gud 4 bigginers like me …


    this is what I have been wholeheartedly looking for…thank very much for making this website freely accessible.

  • Franz

    Can you please structure your HTML such that we can view the text in a wider format when zooming in. And please increase the spacing.

    This would help us sight impaired.

  • It’s really great site to learning C++ , Many thanks for your efforts.

  • Abdul Jalil Soomro

    I love this site. I appreciate those who made it a free resource for poor people like me. Thanks a lot. But I have one question. Is the all c++ language tutorials? I mean I will be able to learn all c++ from this?

  • I am taking C++ for Fall 2013 semester. Definitely gonna be helpful. Thanks.

  • SivaSankar

    Excellent tutorials

  • theintunoo

    I want to share in Facebook to my friends. Can I do Like this?

  • XamaX


    You probably won’t read this but I just want you to know that you should not look at any haters that comment here, they’re probably not interested in programming enough to take some effort and go though the material. I’m sure that there are many more people that read all this and learned a lot but didn’t comment. Thank you very much for the effort you put in this site!

  • tsdrifter

    Hey I just figured I should show my appreciation really quick - this is an incredibly helpful tutorial. I came from a limited background (I knew what if-then, loop, and variables were, but not too much more) and learning C++ with this tutorial is easy and effective. Best tutorial out there for C++ (possibly for any language 🙂 ). Thanks!!!

  • nimadv

    Thank you so much Alex for all the tutorials here, very very helpful and constructive.

    But just one thing…
    you have been used Hungarian Notation almost everywhere and that’s quite painful for newbies like me to read your code, C++ is very hard to read and learn by itself, HN just make it more worst and I preferred to ignore it at all cost.
    Coming from Python background and I learn to code in a human-readable way, Also C++11 is all about making C++ fun again, easier to learn, use and teach. I believe Hungarian-Notation is exact opposite to this ultimate goal and I’m not the only one against this “obsolete” style of coding.

    This is only my personal opinion, thank you again and please keep it up Alex!

  • Very nice tutorials. I am writing a blog on C/C++ tutorials. Hope that people will also like it.

  • shivam923

    void main()
    cout<<"Thnx for these tutorials";

  • Bekim

    Ok, I just started to learn C++, and i found few websites that provides with lessons, but in each one they start good and afterwards they jump so many things, and don't give complete examples, which are very important for a beginner(and there are no exercises). I read your introduction and it sounds promising AND it was very well done, so hopefully the rest of the lessons are as promised in the introduction. i will give it a shot, and after a while i will re-write another comment.
    Good introduction, i liked it… good job

  • Mikey47

    This surely is the best site for an OLD codger like myself. Used to code in ‘assembly’ many (feels like) lifetimes ago; so am hoping to re-learn from the start once more! :})

  • zeynep

    Thanks.I have begun to learn cpp several times.But I didn’t get enough free times.I wish to finish my beginning step with this site.Thanks.

  • MrAlshahawy

    Hi Alex,

    It’s really great site to learning C++ , Many thanks for your efforts.

    Keep Up.

  • Leone

    I am hoping that this tutorial will help me to learn C++, I’m 15 so i hope this works 🙂

  • jesse_skill

    about time a good website thank u

  • Marco

    Thanks Alex,

    I am runing into some major problems building my C++ programs. I am a newbie at C++ and I am hoping that I can learn as much as possible.


  • Ashok k


    This C++ guide was very helpful in learning for new comers like me.
    It would be helpful if you could send me the total content from this tutorial as a file so that i can read this offline.

    Thanks & Regards

  • Keenan

    I’m coding a program using OpenCV, how do I import OpenCV’s information into my object folders?

  • Sai Gollapudi

    Cool! I am looking forward to this experience.


  • Croast59

    Sweet! I’ve been interested in computer programming for quite some time! This looks like a great place for n00bs like myself ^_^


  • DarkOwner94

    Hey Hi This Is a Good Introduction ^.^

  • slier


  • micky

    man i love this site….i really was desperate to learn things n here i m at the coolest site fr beginners….thnks fr this…..:)

  • michael

    Dont know anything about programming what so ever. Maybe this might change that. 😀

  • Anonymous

    I have read this entire tutorial, and I would say you don’t need any prior knowledge about any programming language.

  • ilhan

    super web site. thanks! bookmarked.

  • Noreaga

    lets do this 😛

  • Andrej
    thanks for this page!
  • Nice site, I look forward to learning with you people 🙂

  • Lil

    I need an answer to a basic question. Each time we get example code to test and learn do we open a new project or file (using code::blocks)? If the Hello World is open and I add a new file then it only compiles the Hello World… Did I miss something?

  • jhmex

    this website is good for me, I have a litle experience in c++ but midle one in VB, I need more basic language programing knowledge, so I think there is a right place that I look for

  • mp777

    This site is great! Thanks for all the work you put into it.
    Do you know of any resources where I could find the source code for a complete program?

  • csvan


    I apologize if this is more fit for the forum, but I just wanted to ask:

    I guess you intended this tutorial to be done from beginning to end, together with working off the practice questions at the end of each chapter, but is it equally ok to go through the material however one wants to? I am asking because I would like to go directly to more advanced sections of the tutorial, and not always have to do all the practice questions without moving on. At the same time, I dont want to disrespect you by using the material in a way you did not intend, so it would be kind if you could clear this up. Thanks 🙂

  • Wellington Oronsaye

    I am just beginning to learn C++ language. I have visited other web sites with the aim of getting the necessary tools that will help me to become a good programer in C++ language. Going through your tutorial, I immediately noticed a well prepared tutorial, easy to follow. I am using this medium to express my gratitude for teaching people how to program in C++. I am an engineer specialized in the field of mechanics option conception and design, I have a great flair for the computer and every other thing revolving around it. Thanks once again and keep the good work going.

  • rose

  • Azar

    Ahh…. programing in Cpp, THE most blissful, ecstatic experience in life.

  • ninjabob

    Excellent Tutorial/Guide im just starting out in C++ and found it very helpfull.

    is it available as a PDF by any chance? No internet access on my laptop and would like to keep reading as i travel 😀

  • Ravit

    This is a wonderful tutorial but one thing, I wish you could add some more extensive exercises to practice everything that is learned in this tutorial.

  • Dicennian

    I’m 17 years old in a week. I’ve always thought it’s too late to learn stuff like this. I know, it sounds stupid. But ones for all I want to give it a try so I one day may fulfill my dream of creating a classic 2D RPG from scratch.

  • J. R.

    I learned Basic way back in the mid 1960s. Forty plus years later I learned enough HTML to become a danger. Programming will never be my calling; all I ever really wanted was to be able to look at some lines of code and have a fundamental understanding of what was going on.

    I spent good money to take beginning C++ classes at two area Community Colleges and a state university -what a waste of time and money. Since discovering your tutorial site I have done nothing more than spend about an hour each evening reading the sections, one subtopic at a time. The way concepts and ideas are presented I can even understand and learn! All I can say is, “Thank you so much.”

    You have inspired me sooo much that I will be downloading an IDE/compiler and attempt to write some meaningful C++ code.

  • Sudhanshu Rijal

    I am a begineer and i guess it helps me well.

  • Noha

    Is it sure that the skill of riding bicycle doesn’t fade by the time? I always asked myself this question since my bicycle is broken and don’t have money to repair it.

  • Beginner

    I am a beginner who just finished a tutorial in python and this is exactly what I was looking for to try next.

  • csvan

    My commendations to you, Alex, for this site, it is truly a great work. I recommended it to my former college, and it is now posted as an internet resource for a course in C++ Structured Programming there 🙂

    Thanks you so much for your rich contribution to developers.

    • This site gets linked to a lot as a reference for programming classes. To all future developers, enjoy, and hopefully at some point in your development careers you will be able to make your own contributions to the community at large.

  • devin

    does all this come in book form

  • winson

  • bmxer4130

  • Imran

    i like this site and i love it. and i hope i will get much knowledge from this website.

  • richard johnson

  • Pieter

    I hope this works out, so far so good.

    Future game designer in the making!

  • mHiRa

  • san

    This is by far the best tutorial series on C++ I have encountered. I used to have difficulty understanding C/C++. But this site is the best. The material is organized very systematically. I enjoy reading your material. And ya, I understand pointers now. Thanks a bunch.

  • Mezo


  • Bryan Pakingan

    What’s up Alex! It’s Bryan! I’m trying to brush up on C++ so I can learn how to do some work with gaming dev tools. Actually makes the headache go away after all the testing from work. See you at work tomorrow! Unless you’re WFH. WFW FTMFW! 😉

  • Jamie

    I LOVE your site!
    This is exactly what I need!

  • Nischal Neupane

    [code] Good Stuff!

  • Bryan

    thank you so much i need a way to learn 🙂

  • Namias

    Page makes an excellent reference, top notch. However, I do find it a little boring as a learning method. ;P I’m up to chapter 8 and I usually have to read everything at least twice for it to sink in (I’ve heard that studies show that only 10% of knowledge is retained by reading) on top of that I find I tend to get a little bored and start skimming only to realize I’ve missed something important. Don’t get me wrong it’s a great guide I just wish the examples were a little more hands on and fun!

  • This is a great tutorial.. I have about 7 years total experience in my field(s) and have been looking for a chance to hone/refine my C++ abilities. I think this tutorial is going to do just that. I am planning on slowly reading through the entire thing.

  • Yes its Nice i will try to UPKEEP thos what you suggest to not write when im tired
    and learn to maximum C++

  • Thanks this is a great website I really wanted to learn a programing language free but everything you had pay for but not this

  • wow, sin palabras, por ahora 🙂

  • Timon

    This site is amazing. I’m a beginner.

    Four smiley faces in a row surely means something don’t it? 🙂

  • Gditz

    Sweet, I’ve been doing a bit of programming in Java but from what I’ve been told C++ is the way to go if you want to create games. 🙂

  • Dennis

    Nice! This site is what i’ve been looking for, for a looooooooong time 🙂

  • George

    Niceee for beginers like me 🙂

  • Steve

    Best site I’ve found for beginners

  • Brandon

    This Site is great, This is exactly what I am looking for

  • sirius

    thats exactly what i’m looking for.
    i’m a beginner.

  • Alex Dirix

    I’ll try.

Leave a Comment

Put C++ code inside [code][/code] tags to use the syntax highlighter