0.5 — Installing an Integrated Development Environment (IDE)

As mentioned in the previous section, an Integrated Development Environment (IDE) contains all of the things you need to develop, compile, link, and debug your programs. So let’s install one.

The obvious question is, “which one?”. Keep in mind that you can install multiple IDEs, so there is no “wrong decision” here. During the course of these tutorials, we will be showing you some of the nice features of your IDE, such as how to do integrated debugging. All of our examples will be done using both Microsoft’s Visual C++ (for Windows), and Code::Blocks (for Linux or Windows). Thus we highly recommend you pick one of these.

However, if you would like to try a different IDE, you are free to do so. The concepts we show you will work for any IDE -- however, different IDE’s use different keymappings and different setups, and you may have to do a bit of searching to find the equivalent of what we show you.

Windows IDEs

If you are developing on a Windows machine (as most of you are), then you have two choices:

1) If disk space and/or download size are not a constraint, then we recommend Visual Studio Community 2017. When you run the installer, you’ll eventually come to a screen that asks you what workload you’d like to install. Choose “Desktop development with C++”.

The default options selected on the right side of the screen should be fine, but please ensure that the Windows 10 SDK is selected. The Windows 10 SDK can be used on older versions of Windows, so don’t worry if you’re still running Windows 7 or 8.

This will take about 6.3 gigs of drive space.

2) If disk space and/or download size are a challenge, then we recommend Microsoft’s free Visual Studio Express 2015 for Windows Desktop, which you can find towards the bottom of the page.

The installer that you download off of Microsoft’s web page is actually a downloader. When you run it, it will download the actual IDE from Microsoft and install it.

Note: This tutorial was originally written when Microsoft was distributing the 2005 version of Visual C++. Consequently, some references and screenshots are targeted to that version. Running any later versions (such as 2013, 2015, 2017, etc…) are fine, however, your screens may look slightly different.

Linux or Windows IDEs

If you are developing on Linux (or you are developing on Windows but want to write programs that you can easily port to Linux), we recommend Code::Blocks. Code::Blocks is a free, open source, cross-platform IDE that will run on both Linux and Windows.

Windows users: make sure to get the version with MinGW bundled.

With Code::Blocks, C++11/C++14 functionality may be disabled by default. You’ll definitely want to check and turn it on. First, go to Settings->Compiler:

Then check the box marked “Have g++ follow the C++11 ISO C++ language standard [-std=c++11]:

Note: If “Have g++ follow the C++14 ISO C++ language standard [-std=c++14]” exists for your version of Code::Blocks, use that instead.

After installing Code::Blocks, some users have been getting an error message “Can’t find compiler executable in your configured search paths for GNU GCC Compiler”. If you run into this, try the following:

  1. In you’re on Windows, make sure you’ve downloaded the version of Code::Blocks WITH MinGW. It’s the one with “mingw” in the name.
  2. Try doing a full uninstall, then reinstall.
  3. Try going to settings, compiler, and choose “reset to defaults”.
  4. Try a different compiler.

Alternately, some people prefer to use Bloodshed’s Dev-C++, which also runs on both Windows and Linux.


Mac users can use Xcode if it is available to you, or Eclipse. Eclipse is not set up to use C++ by default, and you will need to install the optional C++ components.

Can I use a web-based compiler?

Yes, for some things. While your IDE is downloading (or if you’re not sure you want to commit to installing one yet), you can continue this tutorial using a web-based compiler, such as the one at TutorialsPoint.

Web-based compilers are fine for dabbling and simple exercises. However, they are generally quite limited in functionality -- many won’t allow you to save projects, create executables, or effectively debug your programs. You’ll want to migrate to a full IDE when you can.

Moving on

Once your IDE is installed (which is one of the hardest things this tutorial will ask you to do), or if you’re temporarily proceeding with a web-based compiler, you are ready to write your first program!

0.6 -- Compiling your first program
0.4 -- Introduction to development

388 comments to 0.5 — Installing an Integrated Development Environment (IDE)

  • Not telling you my name/email

    hi, ive just started, if i get any probs with Code::Blocks i’ll reply here k?

    Also, this is the second programming language im going to learn (original: Python)

    THX XD!

  • Mister teacher,

    I have a question:

    I have downloaded Visual Studio Community 2017 and now after 30 days it asks me to Register and pay.

    Do you know if I did something wrong?


  • My dear c++ Teacher,

    Please let me one more question about Code::Blocks.
    In "Console application" window, does "Resulting filename" mean "Resulting file path"?

    With regards and friendship.

  • My dear c++ Teacher,

    Please let me following question.
    Recently I downloaded Code::Blocks 16.01.
    In compiler settings > Global compiler settings, after
    “Have g++ follow the C++11 ISO C++ language standard [-std=c++11]" there is
    "Have g++ follow the coming C++0x ISO C++ language standard [-std=c++0x]".
    Do you suggest it instead?

    With regards and friendship.

  • Seif El-deen

    hey alex

    i have a windows 10 laptop which IDE program would be suitable for me

    • Alex

      I recommend Visual Studio Community for anybody who can run it. I’m running Visual Studio Community on my Win10 laptop.

      • seif eldeen

        wow i didn’t think that you would reply but well i think that after i finish the c++ tutorial i will be able to do everything and i must encounter some problems in my learning journey so i think that i know where i am supposed to be asking for help

  • Aritra Das

    I download vc_redist.x86.exe(size-13mb).then i installed it but after installing i could not find what to do.I did not find the logo of microsoft visual c++  ..pls helpp…after this thing what should i download ..plz sent me the link

    • Alex

      You downloaded the wrong file. I have no idea where you found this file. The links in the lesson above contain links to the pages that contain the proper downloads (either Community 2017 or Express 2015 for Windows Desktop)

  • Khoi Nguyen

    Hello my teacher,
    I have just downloaded codeblocks and i got  the following error message "can’t find compiler executable in your search path(GNU GCC compiler)". Could you please help me with this?
    Thanks a lot!

    • Alex

      This is a common enough question that I’ve updated the lesson with some suggestions. Please have a read and let me know if any of these were able to resolve your issue.

  • Zach

    Hi Alex,

    Thanks for the excellent tutorials. As a complete new programmer, I hate to sound ignorant or knit picky, but I think it would be very helpful in this section 0.5 to make a note that Windows SDK 8.1 and Windows SDK 10s do not install automatically in VS Community 2017 with the Desktop Development with C++ selection, but they appear to be necessary for the following section. I ran into an error with my attempting to program "HelloWorld!" in the next section despite proper entry. The Solution would be to ensure on the individual components tab that Windows 8.1 SDK and all Windows 10 SDKs get installed along with Desktop Development with C++ from the get go. If Desktop Development with C++ installs without the SDKs, I found you can press the modify button when VS opens and select the SDKs for an update. I only mention the suggestion because I really appreciate the site and all you do, and I noticed some other new folks in 2017 were having an issue as well! From a completely new programmer perspective, I think it would be helpful to avoid an error in the next section! By the way, I am a Windows 7 user, and I apologize if this isn’t relevant for Windows 8 and 10. Thanks, and I hope this helps your site and isn’t a complete waste of space.

    • Alex

      You shouldn’t need the Windows 8.1 SDK, and the Windows 10 SDK installs by default.

      The screenshot in the lesson is the one the appears by default once you select “Desktop development with C++” -- You can see that Windows 10 SDK is selected by default. Was yours different for some reason?

      • Zach

        Yes. For some reason, the 8.1 and ALL the 10s didn’t install with the initial installation and after HelloWorld code tried to run, it would give me an error saying 8.1 was needed. So, I went back to install ALL the 10 and 8.1 and the code ran successfully thereafter.

  • James

    After installing codeblocks,I have tried compiling the program in the next tutorial("Helloworld") and it shows the following message:
    "hello - Debug": The compiler’s setup (GNU GCC Compiler) is invalid, so Code::Blocks cannot find/run the compiler.
    Probably the toolchain path within the compiler options is not setup correctly?! (Do you have a compiler installed?)
    Goto "Settings->Compiler…->Global compiler settings->GNU GCC Compiler->Toolchain executables" and fix the compiler’s setup.
    Nothing to be done (all items are up-to-date).

    Target uses an invalid compiler; run aborted
    The GNU GCC Compiler is installed though

  • John

    Hi, I just installed codeblocks on ubuntu using sudo apt-get install codeblocks, am I missing something because of that or is it good enough?

  • Vaerx

    Hey, I really hope this has a simple explanation but I Just downloaded "Microsoft Visual Community 2017" and I cant seem to get any codes to work. There’s no settings tab and codes like "std" and "cout" aren’t identified / highlighted any color. I try to run the tests anyway but i cant seem to figure it out. I don’t know, maybe I’m stupid.

  • Mahendra

    After installing code blocks,in global compiler settings I found the [-std=c++11] and also C++14 ISO C++ language standard [-std=c++14]. According to instructions I selected [std=c++14] and clicked ok. Now whenever I restart code blocks, the toolbar item called “Build Target” becomes faid in colour hence can’t switch between debug & release. Besides this, on restarting, under global compiler settings the [-std=c++14] is now vanished but [-std=c++11] is still there , so I have to check box C++11. On clicking other compiler options under compiler settings [-std=c++14] is showing. Every time when I opens code block the toolbar item called “Build Target” becomes faid or disabled by itself. What is the solution?

    • Alex

      When you start code::blocks, are you reopening a project? The build target should only be available once you’ve done so.

      • Mahendra

        Is that means if I edit any previous program one or more time then I can’t get access to build and release function at the same time. Do I have to make new project again to get build and release function? And what about [-std=c++14] issue? why it vanished and present only in other compiler options tab(under compiler settings)?

        • Alex

          Once you create a project you should be able to reopen it and continue where you left off.

          I can’t speak to why you’re running into these issues, as it appears to be a program or configuration-specific problem. Perhaps ask on a code::blocks specific forum.

      • Mahendra

        Another problem: After making the very first program "hello world" when I press build(ctrl+f9) it shows:

        === Build file: “no target” in “no project” (compiler: unknown) ===

        === Build finished: 0 error(s), 0 warning(s) (0 minute(s), 10 second(s)) ===

        Why “compiler: unknown” is showing in the first line? Although program executes successfully.

        • Alex

          It sounds like your IDE hasn’t been set up properly somehow. If I were you, I’d try uninstalling code::blocks, rebooting, and then try installing again. If you see the same thing, maybe try a different IDE.

  • Moofuqer

    Im using WinXP, and when I install CodeBlocks I keep getting message/notification "Cant find compiler executable in your configured search paths for GNU GCC compiler" - thats my first problem.

    Second is that, when I write a program altho i have this compiler problem, i get this message in CodeBlocks "Debugger" section
    "Error : You need to specify a debugger program in the debuggers´s setting.
    <<For MinGW compilers, its "gdb.exe" (without the quotes)>>
    <<For MSVC compilers, its "cdb.exe" (without the quotes) >>

    Thank You in advance.

  • Im 15, and I’m trying to get a head start on C++ and Java because I want to work at Treyarch(cliche I know lol) but this seems as if it requires previous knowledge of C++. Is this guide good for people that know absolutely nothing(me) about coding or software in general?

    • Alex

      This tutorial does not assume you have any prior programming experience. Everything you need to know, you will be taught along the way.

  • I find Code::Blocks better because that’s the one I find the layout more I guess logical

    • Cameron

      "Learn - Debug": The compiler’s setup (GNU GCC Compiler) is invalid, so Code::Blocks cannot find/run the compiler.
      Probably the toolchain path within the compiler options is not setup correctly?! (Do you have a compiler installed?)
      Goto "Settings->Compiler…->Global compiler settings->GNU GCC Compiler->Toolchain executables" and fix the compiler’s setup.

      Heh- right after i say it’s perfect

      EDT I dum nvm

  • barry

    Hello do you still have instruction for visual studio 2015? I just got a new laptop, but I don’t know  what components of visual studio 2015 i should install on my laptop

  • Ray

    Can I use Netbeans for C++? I have seen there is an option for developing C++ programs in Netbeans but the Netbeans Installed in the PC I am using is used for writing Java Programs.

  • adam

    if you ever start coding try this exact code

    #include <iostream>

    int main(){cout << "hello\n";


  • Christoph

    Which Workloads/Individual components should i install with the new Visual Studio 2017 to be able to follow this tutorial ?

  • Rodriguez

    Which program is the best if you’re using a Chromebook provided by the school?

    • mpthompson

      I love my own personal Chromebook, but unfortunately it’s not suitable for learning C++ (or most other computer languages) as it isn’t intended to support applications such as compilers, code editors or IDEs.  With some effort, some Chromebooks are capable of running Linux which is ideal for learning C++, but your school probably has your Chromebook configured in such a way that it can’t be reconfigured in this manner.

      To learn C++, you don’t really need a powerful computer.  Pretty much anything able to run a modern version of Windows (7, 8, or 10) or Linux should be fine.  For instance, if you are somewhat adventurous, you can get a Raspberry Pi 3, install Raspbian Linux on an SD card and run the Code::Blocks IDE to learn C++.  A Raspberry Pi costs less than $40, but you will need to scrounge up a second hand USB keyboard, USB mouse, HDMI monitor and 5 volt power brick to get a complete system running. With some searching around secondhand stores you may be able to put it all together for less than $80. There are tutorials on YouTube and in the Raspberry Pi forums that will guide you through the process of configuring a Raspberry Pi and getting Code::Blocks running.

      • Alex

        You can also use a web-based compiler as an option of last resort. They’re pretty limited, but if that’s all you have access to it’s certainly better than nothing.

  • Kush

    Hey Guys just started with these tutorials and are really looking forward to the rest. I just want to know if anyone recommends QT (my IT teacher at school said he will supply me with a copy cuz internet is really shit where I live). Just keep in mind that I am a complete beginner. I am on a windows machine.

    If you guys recommend QT, do I need to know anything else to use QT or can I just follow the tutorials?

    • Alex

      QT isn’t a compiler, it’s a cross-platform application development framework that’s used with other compilers. QT is a fantastic framework, but you won’t need it for these tutorials.

  • Thanks for IDE tutorial, Going to use xcode. But cannot we use sublime text with some plugin?

    • Alex

      If Sublime supports plug-in compilers (such as gcc/mingw) then yes, you could use it. But you’ll have to figure out how to configure it on your own.

  • vimanyu

    C++ 17 is coming guys!!

  • moot

    It might also be worth adding that Visual Studio Code is now available for any os…

    • Alex

      Visual Studio Code is great, and super flexible, but it’s not easy to set it up to compile programs. Therefore, I can’t in good conscience recommend it to new programmers.

  • Devangshu Mitra

    I am downloading XCODE for MAC OS. Any specific instructions or settings i shall have to enable? Greetings

  • Brian

    Hm, is it okay if I just stick with Vim, GDB and the terminal to write/compile/test/debug programs rather than using an IDE? Kinda want to learn how to work with these rather than use an IDE, at least for now.

  • Neraxa

    I use Visual Studios and when i try to debug my project through the Local Windows Debugger, I get the message:
    Unable to start program, the file was not found.
    I have tried to locate the file manually, but could not find it.
    I have also tried to look for something named ‘compile’ but found nothing.
    Is this the correct way I have tried to start my project, or is there another?

    • Neraxa

      ( I have used both the debug and the release configuration to see if it worked, but it came with the same answer … it would be strange if the file did not exist at all, because it is saved. )

    • Alex

      It should just work. Sounds like something didn’t get set up correctly. Try recreating your project again.

  • Khush

    How to download Visual C++. I have already downloaded Visual Studio Community 2015 for my Window 10 laptop.

    • Alex

      Visual C++ is part of Visual Studio Community 2015. If you didn’t enable that option when you installed, there should be a way to enable it from within the application (from within the create new project dialog).

  • My dear c++ Teacher,
    Please let me say that, recently I found this “ide” online:
    It looks to me good. Do you suggest me that?
    With regards and friendship.

    • Alex

      For compiling simple programs, it seems sufficient. However, as with all web compilers, there is no way to debug your programs, so I would not recommend it for anything non-trivial.

      • My dear c++ Teacher,
        Please let me say that, unfortunately, it is not sufficient even for simple programs. It does not execute "std::cin" object. However compiles and executes programs with files, apart object "std::cin".
        With regards and friendship.

        • Alex

          You appear to be incorrect. I was able to compile and execute the following program just fine:

          To enter your input, you need to click on the green console area first to ensure it has focus.

  • rock

    i have ide called turbo c++.Is it an ide and will it work for what we will be doing here.
    and thanks for the website it is awesome

  • lexy

    Time to embark on the journey ahead. I feel this guide will be very fun to follow. I’ll see all of you at the end 🙂

  • Absar

    Hi Alex
    This guide is very good and easy to understand. Well done. My question is that what are the minimum system requirements to program on visual studio express 2013 ? Actually I’m about to go to college to study computer engineering, that’s why I want to learm c   but can’t afford an expensive laptop.

  • RudyR

    Hello there. This site has been quite helpful to me since i missed classes and our teacher memorises the code and teaches us instead of understanding .. so so.
    Anyways it won’t be an issue if i use turbo c++ to do these programs right?
    Thanks again for this wonderful tutorial! Cheers!

    • Alex

      Turbo C++ is a deprecated compiler that does not comply with modern standards. You really should not be using it. You’re better off downloading and installing Visual Studio or Code::Blocks instead (if you can).

  • Liam

    Isn’t c++ usually used to make video games?

  • Patrick McDaniel

    I have code::blocks set up on ubuntu 16.04 and I’m having a lot of trouble with it.  Everytime I try to compile a project it gives the same error "unterminated quoted string"  I can’t find any information on this.  To rule out all possibilities I copied and pasted the code for "Hello world!" and I copy and pasted several other simple programs (inside and outside of this tutorial) as well as manually typing them.  I decided to use Geany as my IDE which was working great until I got to section 1.8 where I could not continue because you can’t make a project with multiple files.

    I think I have some setting wrong in code::blocks I copied and pasted many of the simple programs in this tutorial to both IDE’s and geany worked every time and code::blocks gave me the same "unterminated quoted string" error.

    If anyone can help me it would be greatly appreciated I searched comments on here and I’ve been googling the problem since it started a week or so ago to no avail.

    • Patrick McDaniel

      I solved the problem above ^  its so easy that I can’t believe I didn’t think to try it for so long.  I was saving my projects in a folder called "Patrick’s stuff" and the apostrophe in "Patrick’s" was throwing it off.  Maybe I missed this in the tutorial but it might be worth mentioning.  The only people that I could find with this problem were ubuntu/code::blocks users so it might only affect users with that combination.

    • Alex

      Glad you figured it out. Hopefully this comment will help other readers who encounter the same situation.

  • Garry E

    I see my earlier comment about my difficulties with Codeblocks has disappeared. However, with the help of
    Carl Herolds’ video on You Tube I have finally learned how to manipulate Codeblocks. After the installation
    process is complete and the program is launched the first few screens take you through some housekeeping
    tasks. Then a gray screen appears. Go to menu bar above and click on View menu. Click on Manager. Go to
    Workspace pane on left hand panel. Click on main. "Hello World!" program appears in Editor pane. Go to Build menu above and click on Build/Run. Hello World! appears on output screen. Next, delete what you don’t need from "Hello World!" and type your program in its’ place. Again go to Build menu and click on
    Build/Run. If you have not goofed up, your program should perform as expected. If not there’s
    a ton of stuff at the end of Chapter 1 of this tutorial about what to do next. Which is where I am at now.

    One final comment: deleting a bunch of code to get a clean editor seems like a totally Mickey Mouse way
    to design an IDE!

  • Joey

    XCode is taking forever to install, and as I am 13, I am spending my time typing stupid comments on the Internet!

  • Garry E

    Cheers to you for this great website! I imagine that others have told you that the user interface for
    Codeblocks 16.01 is different than earlier versions and thus your screen shots are obsolete. In particular,
    after the first 3 screens you end up with a gray screen. To get the Management pane you must go to the View
    menu in the Menu Bar at the top of the screen and click on Management. Then, if you entered "Hello world!"
    as the title of your program, sure enough after clicking on main.cpp under the projects tab you do indeed
    get the proper code to generate "Hello world!" on your monitor.

    I have used CB for C coding practice and find it to be very frustrating. For example, if I choose "Console Application" and enter something other than "Hello world!" I have not been able to discover how to get a pure Editor screen. One ploy I have tried is to generate Hello world code, delete that and then write my own code. After that I can debug and compile. After pressing RUN I get one of 2 results: either
    "Hello world!" appears on the screen or "It appears that your file has not been built yet. Do you wish to build it now?" Clicking on yes leads absolutely nowhere! Clearly I’m doing something wrong. I have found
    that a better way is to avoid using Console Application altogether. In the file menu choose New and select
    the File option in the drop down menu. After entering the file path and file name you get the editor for a
    source file. The downside to this seems to be that you can run the program only once. After that the build
    menu shuts down.

    Finally, C coding in Dev.cpp has been less frustrating for me than CB. However, someone wrote a message in the Codeblocks blog saying that the Dev.cpp developer was no longer maintaining the website and they suggested that new users should be aware of the risks before downloading the program.

    • Alex

      What you describe sounds rather strange, but I’m not familiar with the latest version of Code::Blocks. I’ll have to check it out and update the screenshots once I’m back from vacation.

  • GEScott71

    I appear to have successfully installed Visual Studio.  I’m at the start page and it feels like I’m about to enter a new world!

    I am going to install Code::Blocks as well, but I need to free up some more drive space first.  I want to do everything in the tutorial, for a while anyway, on both IDEs as I think it will give me a better foundation going forward. If this is a complete waste of time I’m open to input!

    • Alex

      I encourage you to check out both IDEs. But realistically, once you’ve compiled a few programs with each, there’s probably not much to be gained by continuing to do so beyond that point.

  • Hi Alex,
    I am from India and I really love your lesson’s.
    I just wanted to know that in our institute we are using Turbo C++3.20 for writing programs in c++. Can you Please is it fine to use it with your tutoriols or I need to use this visual c++ ??

    • Alex

      Turbo C++ is very outdated. You would be better off upgrading to a compiler that supports C++11, such as Visual Studio or Code::Blocks. They are both free. If you can not install new software, then perhaps an online compiler would be a viable choice for you (though they make debugging difficult).

      • Our institute is teaching all codes on turbo i installed code blocks with borland compiler and its running same as turbo c++ codes now.
        But in you tutuorials i am facing problem ‘s,since everything is not explained here. I am beginner just started coding now .
        Its the time to move on right path and with your guidance i think i can fulfill it.
        Please help!

        • Alex

          A few thoughts:

          1) Many times I’ll come back to things later once I’ve covered other prerequisite topics first. So if you don’t see something, keep reading through the lessons. It may be in a future lesson.
          2) Analogy time: If you were learning English, I couldn’t teach you every word in English. There’s just too many words. So I’d focus on giving you fundamentals: key words, plus rules about how to conjugate verbs, that sort of stuff. Once you learn enough of the basics, suddenly you can start learning more by talking to others, by using a dictionary, etc… This tutorial is similar. We won’t cover everything in C++ (that would require a 1000 page book, maybe 2000 if there are lots of examples). But I will teach you lots of fundamentals and context. Then you can go out and learn all the other stuff yourself, using supplemental materials.

  • Erad

    Hi Alex,

    Thanks for this great collection of C++ concepts and topics you have on your site here. I fell in love with your site after reading your explanation on the distinction between the ‘heap’ and the ‘stack.’ By the way, I am a self-taught C++ programmer and have been using the DevC++ IDE to run my programs. But I am disappointed that, for some reason, the current DevC++ IDE I have does NOT have a means to enable the C++11 option!! That is why I’m trying out the Code::Blocks IDE on here.

    I have successfully downloaded and installed the IDE and even run the ‘Hello World’ program. However, I couldn’t find this crucial option under Settings->Compiler-> "Have g++ follow the C++11 ISO C++ language standard [-std=C++11]" This is the text enclosed in the red rectangle in your literature.

    Please how can I get this very much needed C++11 option enabled?

    • Alex

      You may have downloaded the wrong version of Code::Blocks. Have a read of some of the answers here and see if they help.

      • Erad

        I downloaded the "codeblocks-16.01mingw-setup.exe" version from the Code::Blocks link in your literature. I would think that’s the correct one to download. Right?

        I checked the link you provided in your reply; the post on there is actually the same problem I encountered. That "Have g++ follow the C++11 ISO C++ language standard [-std=C++11]" is curiously missing in the Settings->Compiler settings->Compiler Flags path!! One entry on the StackOverflow site suggests using the " …[-std=C++0x]" option. I am yet to try that to see how it works out.

        • Alex

          Yes, the 16.01mingw version should have a C++11 compatibility mode.

          I’m not sure what else to suggest. Please respond back if you find a solution, so that other readers who encounter this can be helped.

          • My dear c++ Teacher,
            Please let me say I had same problem with codeblocks-16.01mingw-setup.exe for  Windows XP / Vista / 7 / 8.x / 10. I used " …[-std=C++0x]" option but does not work.
            Hopefully Dev-C++ 4.9.92 works!
            With regards and friendship.

  • reznov

    so is this the code::blocksminGW takes ages to install chat/waitingroom?

  • Barry

    Hi, do you have a forum where people can ask questions about c++ or anything related to c++?

    • Alex

      I used to, but it got overrun by bots and spammers. You can ask questions about the tutorial material and general C++ stuff by leaving a comment on the most-related article, but that’s not really appropriate for more general questions or help with personal projects.

  • coyoteawooo

    I installed Code::Blocks and got an error message that "Can’t find compiler executable in your configured search path’s for GNU GCC compiler."

    I know I had this program before and it worked fine… Now it can’t seem to find the compiler. I tried opening a project and running “Hello World” and it swears up and down that iostream isn’t a thing.

    Is this a download issue?

    • coyoteawooo

      Update:  Uninstalled, reinstalled, did not get error message.  Tried to build "Hello World" again, and it says "fatal error: iostream: No such file or directory"

      • Alex

        It sounds like it’s not finding the iostream header for some reason. That means your code::blocks either didn’t install properly, or something else is going on. What did you name your Hello World program?

        • coyoteawooo

          I was thinking the same thing, but had to go to work.  So I double-checked a few settings.  Looked like it was a file path issue, but I couldn’t get it to ~not~, so I uninstalled… again… and made sure I cleared the left-behind data files I missed the first time.  This time I checked the file paths during install, and they should be right.  Wrote the file and it ran.  But now when I try to rewrite any part of that and compile it, I get "cannot save" messages - like 3 or 4 of them - and then it runs Hello World…  after I deleted Hello World from the page. I assume because that’s what the IDE knows to be the saved info for that page. If I try to add a second page to the project and put the code in there, it says I need to contact my administrator for permission to save to that folder (excuse me?), and suggests an alternate file path.  Tried that one… and it can’t find iostream. Whiskey-tango-foxtrot, Batman?

          Update: Didn’t think it was a thing until I did a double-check… Stupid windows decided it was a read-only, permission required file. When will Windows learn not to do that without asking me? Stupid windows. So I think mayhap it’s sorted, but I’m going to fiddle and play for a bit before I call it resolved.

  • keegan

    Alex, is there any way i can get visual studio on Windows XP

    • Alex

      It looks like Visual Studio 2010 is the last version that runs on XP. I wouldn’t advise running that version because it doesn’t have support for C++11 functionality. If I were on XP, I’d probably go with Code::Blocks instead.

  • Nick

    I currently use the Notepad++ for all my coding it works great numbered lines language selection option so it highlights code etc.  The only down side is for languages such as c/c++, python, and Java I need an external compiler. Funds are always an issue so what would you suggest?

  • sfsdfxsdfg

    I’m installing CODE::BLOCKS, and I’m getting an error message when I click on "Setting" > Compiler > and selecting the "Have g++ follow the C++14 ISO C++ language standard"
    Error message says: “Can’t find compiler executable in your configured search paths for GNU GCC Compiler”.
    This happened even with the MinGW one.

    What to do?

    • Alex

      Hmm, something must have gone weird with the install. The minGW version should have set up the compiler.

      Try going to settings, compiler, and choose “reset to defaults”.

  • Sam the great

    i am using turbo c++ ms dos will it work it has a blue screen and is confusing

  • Jeff

    I’m installing CODE::BLOCKS, and I’m getting an error message when I click on "Setting" > Compiler > and selecting the "Have g++ follow the C++14 ISO C++ language standard"
    Error message says: “Can’t find compiler executable in your configured search paths for GNU GCC Compiler”.
    Do I need to download the C++14 file?

  • daniel bayona

    hello, i have a question. i have a mac, so i downloaded xcode, i was wondering if this page will work for me. I will use de c++ on xcode but in this page you are using other (IDE) that is visual studio. so it will be the same? it would work for me to keep learning on this page? thx.

    • Alex

      Yes, you can use xcode. You’ll have to figure out how to create projects and compile things yourself, but all of the code is OS agnostic.

  • Khaled

    I cant find settings or compiler . the only tabs that i have are File Edit View Debug Team Tools Test Analyse Window and Help settings isnt there. i think its because im in 2016 and i have a more modern program than the one on this page. pls help immediately

    • Alex

      First, what compiler are you using? I presume Visual Studio.
      You can find your default settings in Tools->Options.
      You can find your your project-specific settings in Project->(Project Name) Properties. This one will only exist if you’ve created a project.

  • Liviu

    Alex, i want to say that my PC don’t read Visual C++ 2015.What i can to do? Please, help me.

  • Imnoob

    I tried installing code blocks, it went fine till i opted "Have g++ follow the C++14 ISO C++ language standard [-std=c++14]" then it gave error :
    "cant find compiler executable in your configured search path’s for GNU GCC compiler"

    • Alex

      Turning on or off this flag shouldn’t matter -- that just causes an additional parameter to be passed to the compiler. Sounds like you have a larger issue where somehow your compiler isn’t configured correctly. Try reinstalling maybe?

  • Nick

    I hope I don’t sound antagonistic by asking this, but will this guide make me "IDE-dependent?" I’ve read a lot of negative comments online about learning to code with an IDE, but from what I’ve read in this guide so far, it seems like you do talk about what is going on behind the scenes. I would like to use this guide to learn to code C++, but I also don’t want to be completely dependent on an IDE by the time I’m finished. Is that something I don’t need to worry about with this tutorial? Thanks in advance!

    • Alex

      This guide doesn’t really talk much about how to do things outside the IDE, as it’s focused more on teaching the fundamentals of C++ than anything. I do talk a lot about why things work the way they do, but not specifically in a “here’s how you do this without an IDE context”. That said, once you know how to do something with an IDE, it shouldn’t be hard how to learn how to do it without one. It’s certainly a smaller step than trying to learn command lines/makefiles and development at the same time (triply so for learning to debug -- integrated debuggers are fantastic)

  • Shankar


    I am having a problem with the installation process like-a setup package is missing or damaged.
    tried selecting the option download packages from internet  but that didn’t work.

    C:\Users\tfr\AppData\Local\Temp\{967442E7-8D32-468A-A332-8CC52D721007}\packages\Win81_SDK\Windows Software Development Kit for Windows Store Apps DirectX x86 Remote-x86_en-us.msi

    please help.

    Thank you

    • Alex

      I’m sorry, I don’t have the knowledge to troubleshoot installation problems. Perhaps put that error into Google and see if others have run into it, and whether they have found any resolutions.

      Alternatively, try installing a different compiler.

  • Tunkeat

    For Mac user is there any difference between XCODE 8 and XCODE IDE?

  • UFO

    Hi Alex, is it good choice to develope Bot by using C++

  • Jeffrey

    So here is a really bad question… but do you know if there is any free software out there to practice with?  thanks

  • hussein

    i am having a little problem, every time i ctrl+f5 a source code i get a message telling me that this project is out of date. i searched google for hours without any solution please help 🙁

    • Alex

      I’m afraid I can’t help debug Visual Studio issues very much. Did you try this?.

    • hussein

      i tried deleting the tlog files as suggested, problem is i already checked a box that said to "never show this message again" that came along with the cursed error message :D, so there is no way of knowing i guess.

  • jebastin

    how much time will it take to install VS?

  • Thanks

    Thanks for this great tutorial Alex ! I just enrolled to a programing highschool and i find this very helpfull. Thank you !

  • roro

    Thanks! the tutorial is really great :B

  • Darren

    If a compiler is a program that compiles programs, what compiled the compiler? Is it turtles all the way down?

  • Kenneth

    Ser Alex do you have other account to contact
    Because i have so many questions.

  • Avery T

    Hello Alex,

    I currently only have access to a Mac. Is it better to do coding using a Windows operating system than on a Mac? Also, if I do download an IDE on my Mac, would there be any discrepencies or compatiability issues when following your tutorial? Lastly, is there an update of IDE’s to download on a Mac now that it is 2016?

    • Alex

      Coding on a mac is fine. You should not run into any major issues following the tutorial, though you will have to figure out how to use your IDE. Many Mac developers use xCode, but you’re probably better off searching google for what’s most popular these days.

  • Chris

    Follow-up to my previous comment.  I was able to find the VS 15.0 in the ‘start’ menu.  It was hidden well, but I found it nevertheless.  Windows 10 has it’s drawbacks IMHO.  Thanks again.

    • Alex

      Glad you found it. I’ll leave my previous response there for anyone else who is having trouble (hint: In Windows 10, go to the start menu, then choose “All Apps”).

      I just upgraded to Windows 10 as well and am also making the adjustment. Microsoft made some weird choices.

  • Chris

    Hi Alex, thanks for responding so quickly.  Visual Studio 2015 does not show up on the Start menu.    Within the Program Files(X86), it lists Visual Studio 14.0, but not 15.0.  There is a folder for VB separately.  It took literally hours to download everything; I’m not looking to do that again.  I have used Code Blocks before, but I didn’t really like it.

    • Alex

      Visual Studio 2014 is the right version. There should be a shortcut to launch it at C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2015, and the actual IDE executable lives in C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe

  • Chris

    I installed VS Community with VB 2014.  It did not create a shortcut to startup VB.  Looking through the tons of folders and files, I can’t even find a VB icon to even start it.  Very confusing.  Maybe this is not for me…..

    • Alex

      What’s VB? Visual Basic? If you’ve installed community and installed Visual Studio 2015 correctly, “Visual Studio 2015” should appear in your Start Menu at the top level (not in a folder).

  • Arulalan

    respected sir,
    I am a primary care pediatrician with 31 years in practice, from India. My friends are developing applications for me How to present my needs to them? To this I must know how they are working. The problems they face. their limitation. then I can  break down my needs based on their style.To do this I have been for several years,  going through introductions (only) of various tutorials. I admire your way of guiding the next level and next generation. My best wishes

  • Alex Ioan

    OK, i just began to learn this. Until lesson 0.5  i understand everything. But i ask myself, what can i do with programming what is it good for? Will it help me with anything. So what can i do practical with it?

    • Alex

      You can create applications with it, like email clients, web browsers, games, simulations, productivity tools, or anything else you can dream up.

  • james harmon

    I finally got VS 2015 to load, then the first step says to go to the file menu, and chose new project, and a dialog box will open. There is no option for "new project" and no dialog box opens. Consequently I am stalled directly out of the box. Any ideas?

    • Alex

      Did you go to File -> New -> Project? If that doesn’t exist, make sure you’ve actually run Visual Studio 2015, and not something else like Visual Studio Blend.

    • james harmon

      I think I had two conflicting problems, I needed to do several updates on my computer, at the same time as I was trying to download VS 2015, I couldn’t do either, It finally downloaded with two missing/damaged files. Finally I had to uninstall everything, do all the updates, and start over for the 3rd time, but it finally did it. Now I am having other problems now, but I can probable figure it out eventually

  • Mike V

    At the time of reading this, it says to use C++11 for code blocks, but C++14 is an option. Is there any reason to use 11 instead, or is this a typo?

  • Patrick

    Google and found a solution.


  • Patrick

    HI Alex. I have a Toshiba with window 7 updated to windows 10. I have tried to download Visual Studio Community with out success. Tried Code: Blocks Still no luck. Currently have Code: Blocks with this Error

    The application encountered an error at
    C:\CB15xx\src\sdk\configmanage.cpp, on line 236.
    The error message is:

    TinyXML error. Error document empty.
    In file: C:\Users\owener\AppData\Roamong\codeBlocks\defualt.conf
    At row 0, column: 0.

    code:Blocks Version 10702 (gcc 4.9.2, build Jan 25 2016

    The directory C:\CB15xx Does  not exist on my drive.

    Any Help.

  • lahggg

    This has nothing to do with this but it’s weird you’ve been reading comments for at least 8 years.

  • William

    Hello Alex,

    Do you have any idea regarding what to do when the "another installation is in progress" message turns up during the Visual Studio Community 2015 setup? (It’s untrue. No other installations are running.)

    What I’ve tried so far:

    1. Un-installing and re-starting the installation process. (Doesn’t work. The message still appears.)
    2. Restarting my computer. (Again, no difference.)
    3. Selecting Windows Installer properties in order to change the Startup type to "Disabled." (This is advised by Sheryl’s blog. However, my computer doesn’t let me change the Startup Type.)

    • Alex

      No idea, sorry. 🙁 I’d see if you can find a solution or workaround using Google search. If not, then maybe switch to Code::Blocks for now.

  • Big"B"LuvRRR

    Good grief, does anyone have any idea -- any fanciful stretching of the imagination of any kind whatsoever that would even begin to maybe possibly somehow explain (even just a teeny-weeny-little bit) -- WTF Micro$N0T decided to ***hide*** the Visual Studio application icon in 2015???

    Moreover, WT-Double/Triple/Quadruple/Quintuple-F did they litter the (Windoze10) Start Menu with !!!THREE!!! separate Visual Studio folders?????

    Why oh why oh why do programmers and/or their bosses keep doing things like this???

    That’s the biggest mystery of all to me…I wanna learn programming just to get inside the heads of these #$%&@!s…just don’t understand so many of the bone-headed "design decisions" (I can only hope they’re actual decisions and not just "incidental bugs" [the kind that’s shrugged off as not worthy of fixin’])…there should be a separate chapter at the end of the course on just that!!  LOL

    BTW, thanks for the tutorial -- I echo (no pun intended, as this ain’t PHP!) the positive sentiments everyone’s already expressed…now if you could just explain stuff like this Visual Studio nonsense which has got a beginner like me fumblin’ for two straight days until I finally found the obvious answer….I’m talking about the 2015 Community edition of VS here…thanks….

  • Anders

    For those of us using Code::Blocks, you state that we should make sure c++11 functionality is turned on.  Is that correct, or should I be turning on c++14 functionality instead?  Thanks for this website, I am finding it very helpful so far.

    • Alex

      If your Code::Blocks has a checkbox for C++14 functionality, turn that on instead of C++11.

      • Big"B"LuvRRR

        Confused; please advise: I just downloaded Code::Blocks and see no C++14 functionality/compatibility option in Settings>Compiler>Compiler Flags…where is this, please?

        • Alex

          I don’t think Code::Blocks has added a c++14 flag yet. I’m not sure if that’s because they haven’t bothered or because the compiler that Code::Blocks ships with isn’t c++14 compatible.

          For now, if you want to use c++14 functionality with code blocks, it appears you’ll have to do some work yourself. See this. Personally, I don’t think I’d bother (c++11 is where most of the good stuff was added anyway).

  • Jim

    Code::Blocks users.  A new version of CB (16.01) was just released recently.  If you’d like to download it you can go to the CB Forum or the Internet to find a link. The installer will remove your old version.

  • I’m using this to make tf2 mods

  • Greatly

    Hello, and thank you for supporting me ( If you do ) anyhow as I only have about 3.2 GB of storage on my laptop and the downloadable’s are 6+GB’s is there another IDE to download that’s around 3 GB’s of storage.
    Thank you.

  • Is notepad++ usable to? Or is that a comete different program. Love the website !
    ( i know nothing bout this so yheaaa )

  • Jimmy


    Ty for the guide, it’s really useful.

  • Danual

    Hi Alex,

    Sorry, but  just noticed a grammatical error here: "You’ll want to migrate to an full IDE when you can"; it should be "You’ll want to migrate to a full IDE when you can".

    Btw, thank you so much for these detailed tutorials, really enjoying them! =)

    • Alam

      I don’t think that that is a true grammatical error.  "a" and "an" are identical in meaning, function, and placement.  The choice is based on phonological rules: "an" before a vowel sound and "a" before a consonant.  I frequently notice the use of "an" before consonants in reputable publications such as the WSJ and the NYT.  I am not sure if a new rule is evolving or the editors are getting lazy.

  • M

    whenever i try download community 2015 or express 2013 it says i cant do it unless i have a newer version of windows and i have windows 7 , what should i do ?

  • MrDoekje

    I installed  Visual Studio Community 2015 and every other week it has a update that takes ages to get Applied is there any way around this?

  • It might be a good idea to put a link to an actual Xcode page rather than a page on Wikipedia.

  • ZombieMcgiggles

    Great to see that you’re still keeping up with, and updating this guide.

  • Joergen

    I`t seems like it is not dowloading at all, but i cant uninstall it or Close the download. I can do absoulutly nothing. All it says is " acquiring: Microsoft Visual studio preparation" and "applying: Creating a system restore point…" It has been like this for over 2 hours or so. I am using Windows 10, and have  had problems With downloads on other stuff… Could Windows 10 be the reason i can not download it? And, how can i uninstall it? itwont give me permission, it only loading With "Stopping current session…" But nothing happens

    Please help me! Your guide looks amazing and i look forward Learning to program 🙂

    • Alex

      Sounds like a bug with your operating system, which isn’t something I can help fix. You have a couple of options:
      1) Download an ISO image of the compiler, burn it to a CD/DVD, and install it from there. You can download the ISO from here, under Visual Studio Downloads -> Visual Studio 2015 -> Community 2015, choose format ISO.
      2) Download a different IDE, like Code::blocks and avoid Microsoft’s installation process.

      • Joergen

        I fixed it by installing my OS over again, now i managed to download Visual Studio 🙂 I look forward Learning from your master work!

  • radhika

    i tried downloading the visual studio 2013, but it says that a newer version of windows is needed, i currently have windows 7, also it says to install internet explorer 10. i tried with both the ide’s mentioned for windows. same problem occurs in both the cases.

    • Alex

      That’s odd. I have Visual Studio 2013 installed on my Windows 7 machine. Are you sure you’ve downloaded the Visual Studio 2013 for desktop version?

      I also have Community 2015 installed on my Windows 7 machine. It works just fine. Something else must be going on here.

  • Luke

    I allotted a certain amount of time to read each chapter. >Download/installation takes hours

  • Vatsal Sheth

    I tried downloading code blocks with MinGW package but whever i run c++ codes it says header file (iostream) doesnt exist. I tried re instaling still same problem occured. Can you give me link for download thanks 🙂

  • Ashutosh Sangwan

    I just wanted to ask you if Microsoft Visual Studio Community 2015 is free. It’s saying that it has been 30 days and your license has expired.

  • DS

    Just a quick question, Microsoft Visual Studio Community 2015, claims to be cross platform to develop any program for any platform. Is that correct ?
    So that I can keep using it for all purposes. Please advise.

    • Alex

      I don’t think you can develop _any_ program for _any_ platform. Just ones they support.

      Note that you can have more than one IDE installed, so installing 2015 doesn’t mean you have to stop using an older or different version.

  • Steven Wolf

    I am having trouble installing VSC 2015. It keeps saying files are missing. Could it be because I have Windows 10?

    • Alex

      No, I saw the same behavior with Windows 7. There’s a bug in Microsoft’s Visual Studio Community 2015 web-based installer. Try downloading the ISO file and burning it to a DVD and installing it from there.

  • saurabh

    Hey is Visual Studio 2012 fine?

    • Alex

      It’ll work, but Visual Studio 2012 has poor support for C++11 features. You’d be better off with at least Visual Studio 2013, so you can use C++11 features.

  • Hello Alex, great information, fantastic site. I haven’t used C++ in over 20 years when I was a teenager trying to program a game with a group of friends. This is great for me to kick start my brain for the basic information I need.

    So far I am downloaded the Visual Studio 2015 through Google Chrome orginally. I have it downloading where the screen says applying and acquiring.

    Its been an hour already and it seems to be getting nowhere. I have Windows 8.1 and plenty of spaces and selected the options that you suggested above. I will let it download overnight. If it does not complete the download, any suggestions?

  • Guy

    Thanks for this online C++ MasterClass 🙂
    Already learned some new things.

  • sageek

    IDE is very large for my HDD.
    Someone has told me to use Vim, I am currently learning it’s commands. Do you recommend it anyway.

    • Alex

      Personally, I hate vi/vim. They’re very powerful if you know how to use them, but they’re also hard to learn and really arcane. I wouldn’t recommend them to anybody.

  • Carl J

    Thank You so very much. It is an awesome thing you have here.I am 57 yrs old and the you show how to do it, even a middle aged guy like myself can understand.

    Again Thank You, and may God bless you.

  • Marie

    I have migrated to Windows 10 recently
    Did anyone have the same issues of IDE installation(microsoft 2015 as indicated above)?

    Thank You
    Best Regards

  • Marie

    Hello Alex,
    Thanks for this incredible tutorial.
    I have one question for you: I am installing my IDE but it is taking so long and I did as you stated in instructions above.
    Thanks for your help.

  • Carl J

    I have an older computer,(windows 6.5). I can not down load the IDE for 2015 because I don’t have new enough software. Is there a place where I can download an older version of  the IDE?

  • Ankesh

    i have windows 7 ultimate….when i tries to download visual studio 2013 from the link you mentioned above .
    It gives me an error that this version of visual studio isn’t compatible with this version of windows …what should i do?? does Microsoft provides any previous version of visual studio for free if yes, can u pls share the link with me?

  • Nathan Whitt

    While trying to download and install Visual Studio Community 2015 on my Windows computer, the installer has not gotten past "creating a system restore point." Is there something I need to fix or worry about, or does it usually just take a while on that step?

  • deepu

    I have netbeans IDE and I am having problem setting up mingw. Please help.

  • cassidy

    hello. i already downloaded the visual 2015 before i ca
    me across this site. is it okay if i didn’t use the custom installation? i am a beginner. and this freaks me out. thanks.
    P.S. you really have a good site. Keep posting!

    • Alex

      If you didn’t use the custom installer, you won’t have the C++ templates installed. To install it, you can directly launch setup again using “Add or Remove Programs” in the Windows control panel.

  • Qaiser

    Really Great Sir Alex.
    You helping the people a lot.
    Bundle of thanks.

  • Arsene

    I keep encountering the same problem when intalling visual studio. I get "A setup package iis eithher missing or damaged" with the following options:
    download the package from the internet
    skip package
    or to provide a location to search for the package
    I keep return to the same error no matter what I chose. I even googled it but I’ve come up with nothing. What should I do? PS: I have widows 1 upgraded from Windows 8

    • Alex

      I’m not really qualified to diagnose Windows or Microsoft errors. But check out this thread, which has some ideas:
      1) Try downloading an ISO and burning it to a disc (or mount it as a virtual drive), and installing from that.
      2) Make sure you have internet connectivity when installing. Visual Studio apparently needs to install some certificates which it grabs from the web, but it can’t do that if you’re offline.

  • hey alex!
    i am unable to donload visual studio….
    can i work on (c++ shell)

    • Alex

      I don’t know how compliant is with C++ standards. You are welcome to try though! In the worst case, something won’t work…

      • soham

        try putting in ur url and see it!

        • Alex

          I did. Since it supports C++14 and console output, it’ll work for some of what this tutorial covers.

          However, it’s lacking some important functionality:
          * Multiple files. It appears you’re limited to one file worth of code. This isn’t a problem for simple programs but learning to deal with multiple files in C++ is important, and you won’t get that if you use the website.
          * A debugger. This means you’ll be limited to debugging your programs visually. That’s inconvenient, but not necessarily a showstopper. However, learning to debug things with a debugger is a useful skill to have in your development toolkit.

          So overall, I’d still recommend a real IDE.

  • Simon

    Hi. I’m having some trouble downloading visual c++ express and i would really appreciate any help. i keep getting "ENU package failed" and i’m not sure what to do. I tried searching for solution but couldn’t find anything. Should i download the full vs express (wdexpress and the other one) or should i look for a different ide? thanks in advance

    • Alex

      Have you tried the solution at this link?.

      It sounds like something Microsoft related is corrupted. If all else fails you could use Code::Blocks, since it’s not going to rely on anything Microsoft.

  • Chester


    I have Code::Blocks on my Windows 8.1 laptop, and I have a question…

    What is the difference between GNU GCC Compiler and Microsoft Visual C++ 2010, or is there no difference?


    • Alex

      There are differences both between the compilers and between the IDEs themselves. However, either one will compile properly written C++ programs into executable files, so which you prefer is really a matter of personal taste.

  • barba mosso

    Hello Alex,

    After some research I’ve chosen to learn C++ as my first programming language through your website.I’m downloading the Visual Studio at the moment. Just wanted to thank you for your awesome work while (eagerly) waiting.

    Greetings from Istanbul

  • So I’m making a video game, and the game engine I’m using is based off c++(Unreal Engine 4). Just wondering will learning all of this benefit me on making my videogame?

  • Volker

    I’ve installed Visual Studio Community 2015 but wasn’t aware it’s a limited trial for 30 days?
    Guess I’ll go with Code:Blocks instead, unless you have any comments regarding that apparent registration/purchase of Visual Studio, Alex?

  • Dav

    Hello, after I downloaded the Visual Studio 2015 and tried starting a new project. The template for C++ doesn’t appear. It only shows C# and Visual Basic.

    I tried modifying, and then uninstalling the whole thing. Double checking that I chose the C++ from the setup page. Still, the option for the C++ template doesn’t appear.

    Help please?

    • Alex

      I’m not sure why this is happening. Sounds like a bug in Visual Studio maybe.

      Two things to check:
      1) Did you ensure that the “Common Tools for Visual C++ 2015” subitem was checked when you installed?
      2) Try running “devenv /InstallVSTemplates” from the command line as an admin and see if that’s able to fix things.

      If neither of those address the issue, the only thing I can suggest is maybe searching Google for an answer. I wasn’t able to come up with anything definitive.

  • Lucas

    i don’t have much disk space and my download doesn’t start (using windows 10)

  • Charley

    Hi there,

    I am about midway through the tutorial now. You’ve done a great job.

    There is one question though. I am trying really hard to get away from Microsoft. What would you recommend for building a C++ based GUI program for Windows?

  • kingrubi

    hey u can use Notepad++ very light software but can help in programming too 😀

    • Alex

      Notepad++ is a fantastic editor, however I don’t recommend it for new programmers writing C++ applications because you have to set it up to work with a compiler (minGW) manually. You’re better off installing something that comes with a C++ compiler set up out of the box.

  • Sanjiv Prasad

    I will be using the 2015 Visual Studio RC available for Windows 10 Previewers. It downloaded with about 20 other programs. Are these other ones necessary? Also, it came with a package referred to as Blend. Do you know what it does?

    • Alex

      I don’t think most of the other programs are necessary, but I also don’t see any way to not install them. 🙁 It looks like Microsoft has taken to bundling in a bunch of miscellaneous stuff to get wider adoption.

      Blend is an application to develop user interfaces for web and desktop applications.

  • Ivan

    I’m newbie in c++, and I have a question about general architecture behind c++ compiler, linker etc. implemented in Visual Studio (I don’t know why it actually bothers me, let say just my curiosity). As I got it from Wiki and other discussions in stuck-overflow threads that languages like Java and C# use virtual machine that compile code into sort of ‘common intermediate language’ and then this CIL-code into native machine code. This procedure has been introduced (as i understood it, i might got it wrong, correct me if i’m wrong here) in order to prevent incompatibility of written code with hardware of various devices, that may happen if you use just compiler (w/o virtual machine). Thus, the question is how does it work with c++ in VS? Is code compiled in to native machine code or it’s done via virtual machine?
    Thank you.

    • Alex

      Native C++ is compiled directly to native machine code. There’s no intermediary language. This is part of what makes C++ fast. The downside is that C++ programs need to be recompiled for each target architecture.

      For languages like Java and C#, those languages are compiled into an intermediary language. When the Java or C# app is run, the intermediary language is compiled just-in-time to produce an application that can run on the target architecture. The advantage of this approach is that one program can work on any architecture that supports the just-in-time compiler. The downside is that there’s a performance cost.

      Microsoft does provide a C++-similar language called C++/CLI that’s meant to be compiled into an intermediary language instead of directly to native code.

  • Adam

    The Visual Studio website lists ‘Visual Studio Community 2013’ alongside the ‘Visual Studio Express 2013 [for Windows Desktop etc]’. After doing some Google research the ‘Community 2013’ IDE seems like a much better choice than ‘Express’, with several features that ‘Express’ does not have. I can’t see why you’d recommend Express over Community, so could someone please clear this up for me?

    • Alex

      Mainly because Express is smaller. If you aren’t worried about bandwidth or hard drive space, you’re welcome to get the more powerful Community version instead.

  • Varun Saini

    This is my first day and I really need to say that this site is the best… but I didn’t understand what to download… Can someone give me the link of good IDE… I have windows 8.1… I need the latest version of whatever I need to download

  • Alexander Terry

    Hay alex,

    Code::Blocks seems to have… stagnated. last update was in 2013. i found CodeLite( ) witch does the same things as code::Blocks. you could swap the links out in the page up top.

    • Alex

      The Code::Blocks folks are producing new builds for testing two or three times a month, so active development is still happening. I’m not sure when their next official build will be ready, but version 13.12 is fine for these tutorials.

      That said, you’re welcome to use something else as well.

  • Hanna

    Hi, Alex. Is it okay to use Code::Blocks 13.12?

    Great site, btw.

  • Joey

    Visual Studio 2015 has been released, will I run into problems if I use that for your tutorial?


  • Nitin

    hey Alex,
    i am an experienced c++ programmer and i’ve used Visual Studio 6.0, MS Visual Studio 2005,2008,2010,2013 and did not find much difference between the compiling capabilities of these softwares and Turbo C++…… but still i want to know what exactly does the former does which makes it better and more reliable than the latter?
    thanks in advance…. 🙂

    • Alex

      I’m not clear on what you’re asking. Are you asking why Visual Studio is better than Turbo C++? If so, I’m not sure, as I never used the last version of Turbo C++ to compare.

    • Mohit Chahal

      Nikhil you just said that you are an experienced c++ programmer. If you are, then how don’t you know how horrible turbo c++ is? Turbo c++ is a nightmare for any good c++ programmer. For example, if I recall correctly the maximum memory that a turbo c++ program can take is 64 kilobytes. It is only for true and non-interested beginners. I would say you use turbo c++ yourself and you’ll know it. And how is one even able to read the code on that painful blue colour!? Also using a "good" IDE is advised to two kind of programmers - 1. Very beginners and 2. Very experts.
      If you just want to learn c++ and are older than 5 years then I prefer you use Command Line, Shell, Terminal or whatever that you have. Because that’s how you learn!

  • Sushil

    Hi, I am installing IDE. Which is visual studio 2013. In very begining its asking optional features to install. Which are 1. Blend for visual studio. 2. Microsoft foundation classes for c++. 3. Microsoft SQL server data tools. 4. Microsoft web developer tools. 5. Silverlight development kit.
    Should i install all of them? OR perticular ones. And can you tell use of each of them in brief? Thanks.

  • Syntus

    hey Alex, thx for the great stuff so far. I learned more from this site then from the yt videos. I really hope I become a great designer. THX!

  • Rahul

    Hello Alex, I am new to the tutorial but this is fantastic!
    I will download ‘Express 2013 for Windows Desktop’ for my windows 7 PC (64-bit). Will it be fine? Thanks in advance for your precious reply.

  • Mridul Verma

    I am very new to programming, this website perfect so far, I am keeping y expectations very high!
    I am downloading Visual Studio Community 2013 Upgrade 4 to begin with, but its size is way to big, like around 10gb! will this be worth the th effort?

  • Just because it wasn’t mentioned in the tutorial; another excellent, cross-platform, open-source IDE is Netbeans, which will work for both C++ and Java (should you ever use it).

  • Lourence

    Nice reads and tutorials so far. currently downloading my IDE. I will learn c++ using this site. thanks..

  • Jackson

    Do i need to install this on my main drive? or can i just use my storage drive?

  • Eric

    Do you know if Notepad++ has a build in linker? because i don’t know whether or not it’s better for me to download a full IDE.

  • Chase

    I like to use notepad++. I was wondering if you knew how to add a c++ compiler to notepad++

    • Alex

      I don’t. Notepad++ was just designed as an editor, not a full IDE. It’s possible that this could be integrated as a plugin. Maybe check out this page for tips to get started down this path.

  • Niranjan.A.S

    can i use Visual Studio 2013 ultimate?

  • Onur

    Hi Alex,

    There is a little of empty space on my hard drive where OS installed. Will there be any significant difference if I install it on another drive

    • Alex

      Shouldn’t be a problem. Do note that some files will still need to be installed on your OS drive, so you’ll need a little capacity there.

  • Hussam

    Windows 8 making it look quite hard, I can’t download Visual Studio Express 2013 for Windows Desktop program can you give me any links for another free version please? and thank you in advance.

    • Alex

      Hussam, same answer as for GARRY. Visual Studio is behind a login gate, so I can’t give you a direct link to it. If you can’t get to it for some reason, you could try Code::Blocks instead.


    Hey Alex, this is the best tutorial i have ever seen. can you me give me direct download link of visual studio express 2013 and tell me how much size it is.

    • Alex

      Hi Garry. I can’t give you a direct download link because Microsoft has gated it behind a login. You’ll have to create a Microsoft account to get to it.

      I’m also not sure how large it is, because the installer is a downloader that downloads the product. The downloader itself is only about 1 meg, but the full package is significantly larger.

  • Damned Soul

    Which is the best IDE for my PC? Its a HP Pavilion with Vista on it and 2GB RAM and is 6 years old.

    ALSO, IS C++ any good these days to make games using SDKs?

    PS: Do you have an email address on which i can contact you?

    • Alex

      Since you’re running Vista, I’d recommend Visual C++ 2010 Express. There’s a link to it in the article above.

      C++ is a great language for making games using SDKs.

      You can contact me via the contact form in the contact section of the website.

  • Reda

    Hey Alex, is C++ recommended for server-side programming ?

    • Alex

      This question is hard to answer because it’s unclear what you’re trying to do.

      If you’re writing something that needs high performance (e.g. a search engine, a trading engine, etc…), C++ could be a good choice. Google, Apple, and Facebook all use or used C or C++ for parts of their frameworks.

      If you’re doing something lightweight, then Java, PHP, or Python could be better choices. But again, it really depends on what you’re trying to do, and how you want to weight performance vs ease of use.

  • Olaf

    Dis Is the best tut so far >< thank you learncpp

  • Ed Levy

    I have a feeling I did not download the quite correct option. After clicking on Visual C++ 2010 Express Edition I now see there are several options that say Express 2013 with Update 4 for Web/for Windows/for Windows Desktop. Should I try the Desktop one?

    • Alex

      It looks like Microsoft updated their website to de-emphasize the 2010 version.

      If your operating system can run the Visual Studio 2013 Windows Desktop edition, that edition is fine. If not, you can still find the Visual C++ 2010 Express link toward the bottom of the page.

  • Ed Levy

    I downloaded Visual C++ 2010 Express Edition from the Windows section of 0.5 but I do not have a desktop icon so how do I launch it to even get to the File menu as indicated in 0.6?

  • Sparsh Jain

    I’ll be using Visual Studio Express Edition 2013. Will it all be compatible with that too?

  • BananaCrysis

    Can I use Code Blocks to write programs for Windows?

  • Batuhan

    i installed Visual C++ 2010 Express Edition

  • nan_00988

    Is their an IDE that one can download for chrome users?

  • theodoros_1234

    I have successfully filled up my hard drive with programs! Microsoft Visual Studio was the last program I have downloaded.

  • Mike

    Hi Alex,

    I represent a high school robotics club, and we are interested in moving from Java to C++ to program our robots, because we’ve heard that the latter offers more flexibility and functions.  Do you have any insights you could offer, regarding using C++ for this purpose ?
    Also, I am using a school laptop for the tutorials, but before I load the IDE for Windows onto this machine, I want to insure that it will not create any issues/conflicts with our school network/programs. Anything I should know ?
    Thanks so much.

    • Alex

      Hi Mike.

      I’m sorry, I can’t comment on the usefulness of C++ for programming robots.

      Loading Visual Studio shouldn’t create any conflicts. However, in the interest of being cautious, I’d try it on one first and make sure nothing explodes before proceeding.

  • SHEN


    • Alex

      What examples are you referring to? If you’re talking about the code examples on this website (in future tutorials), they are written to work in any IDE (or on the command line).

  • JSV


    I have Win7 x64, a couple of years old HP laptop. There seems to be all versions of MV C++ Redistributable from 2005 to 2013 in the programs list, though 2012 is the last version for x64 in my list.

    Is it OK to uninstall all the earlier versions and updates assigned to the earlier versions, as well as the versions for x86, and keep just the latest one for x64?

    Furthermore, there is a new 2013 version for x64 in the download list (for some reason I dont have it, just wondering since I dont remember deliberately installing any of these versions, I seem to have this IDE since the first setup). Anyway, could it be better to uninstall all these versions and just download the latest 2013 version for x64?


    • Alex

      The Visual Studio redistributables are commonly installed and used by normal Windows applications that have been developed using Visual Studio. They are not the same thing as the Visual Studio IDE/Development Environment, so don’t uninstall them. If you do, you will probably break other applications on your machine.

  • Sam

    Hi there,

    I am following this tutorial on a ‘Raspberry Pi’, which uses my own Linux-based operating-system. I cannot install any of the recommended compilers, so I am using g++. However, it can’t find ‘iostream.h’ or ‘string.h’ etc.. Is this a limitation of my hardware, or have I missed something already?


  • M.R.Q

    Should a beginner use an IDE? Zed Shaw author of the hard way series do not likes beginners to use an IDE.

    • Alex

      > Should a beginner use an IDE?

      There’s no right or wrong answer to this, just differing philosophies.

      Zed says no, and he has his reasons for saying no, and those reasons are valid.

      I say yes, because my goal is to make learning to program as easy as possible, and IDEs assist in that goal. You can always ditch your IDE later if and when you decide you want to learn more about how things work under the hood.

  • Kevin You

    What is a C++ qt application?

    Can anyone help please?

  • Trung Pham

    Hey ! Can I ask you something ?
    I use visual studio 2010 and when I run my program , there's a problem

    Unable to start program'c:\users\user\document\visual studio 2010\
    The system cannot find the file specified.

    I can't fix it by myself. Please help

  • Ken Cope

    Thanks for this GREAT SITE!!!!!   A few weeks ago I browsed about for a while, and
    easily recognized the exceptional structure and many of the attractive features.  I
    look forward to a smooth learning curve, and expect to capture the essence clearly
    the first time thru.  I hope that its ok to browse about and salivate-ha - ha…kc

  • Juan Diego

    Is Visual Studio Community 2013 ok to use with your tutorial? I was wondering since it’s free and seems much more complete than Express. Great tutorial by the way, tremendously helpful. Thanks for your response.

  • Alexandra

    I have a question: when installing the Visual C++ 2010 Express Edition it didn`t appeared the box with MSDN version, only the SQL box. What does it mean? Was it downloaded/instaled automatically? Or should I install something else? :/
    Thank in advanced for your answer.

  • Ethanicus

    So far so good! Downloading C++ 2010 right now.

    • Alexandra

      I have a question for you. When you instaled it (C++ 2010_, have you seen the box for Microsoft MSDN? I am asking because I didn`t, and I would to know if this is something normal or not. Thank you.

  • jacwib

    This was the easiest step. Seriusly, i just did

    . That was easy.

  • cheapy

    The Orwell Dev-C++ IDE (took over the Bloodshed one) works and is available for free at

    I would suggest trying that rather than other ones where the syntax isn’t exactly correct especially if you are a beginner.

    • cheapy

      Actually, the instructions are clearer for code::blocks and all you need to do to install it is follow the link, go to downloads and select the one for your system.

  • shiki

    hello guys , this is a very noob question ,i know , but i just started here yesterday and i find this incredibly helpful but i encounter a problem when downloading visual c ++ express edition compiler . when i go to the site it says microsoft visual studio . is that the same thing . i d really like to be sure XD .

  • Krazh

    Starting using this site yesterday and so far I love it! Great job!

    I was just wondering how you actually end up with a program that you can run in windows? I’m using Visual Studio Express 2012.
    When I was working on my MacBook it wasn’t a problem as I could simply type ‘make’ in the terminal 🙂

  • mona

    Will Visual C++ 2010 Express Edition be ok to install as i am a complete beginner and have windows vista? or should i install the recommended 2008 version? i’m wondering if it will run on vista since a commenter complained that it didn’t.

    btw, this is an amazing free resource. you have my eternal gratitude.

  • Mena

    Um…so I installed MS Visual Basic 2003. is that okay?

  • Hello, for slackware users, i currently use slackware 13, you may install Code::Blocks from here and dependences from too. Geany (Recommended) is simple but fast for short examples, you can download from I dont recommend Bloodshed DEV-c++ for windows is too old instead you can use wxDev-C++ download here Bye

  • fero45

    For the very beginning, to test simple code, I would also recommend Geany editor. It runs under Win and Linux. It’s got an in-built terminal. I use it for scripting and testing my scripts in PHP and Perl under Linux.

    Write some code, hit F8 (compile) then F9 (build) and then F5 (execute). In two seconds you can see your output in the terminal. Change your code and hit the function keys again. In a minute you can test your code a couple of times.

    Linux users have to install g++

    Of course, install Code::Blocks under Linux too 🙂

  • Dicennian

    Nice that these things are free. Probably the first tutorial I will ever follow where it feels like if I have the same program xD

  • Space_Knite2

    I Like these tutorials, usually i end up sitting at my computer, staring at huge (and i mean HUGE!) mindless scripts and texts which never really work

    at least this tells you what you need to do accurately, rather than placing you in the middle of something completely alien to you.
    And in answer to your question Noha, the writer of this stated the only difference is the window organisation (the screen of the program is arranged differently)

  • Monco

    I prefer Microsoft Visual Studio 6.0 IDE.
    i’m using Visual Studio 6.0 and I never had problems so far. It’s very comfortable and reliable. Works with Windows 95/98/2000/Me/XP.

    • I used Visual Studio 6.0 for a long time. Was a good product. The downsides of it are:
      1) It’s not free
      2) It only has a partial template implementation, so a lot of modern template code doesn’t work on it.

  • ANshul

    hi i am downloading the 2008 microsoft version of c++ express its 96 mb is it the right thing ?and do i require some sql thing

  • I liked Michael’s comment about bloodshed DEV-c++. Every computer on my school campus has Bloodshed DEV-c++ installed on it. It seems to be very popular for both Windows and Linix (I think it can even be used on Macs but I am not sure). It looks like it is the new hit program to work with C++

  • Rudy

    Alex, I have used this site for a few months now (great tutorial!) and have just now registered to ask this. I can’t seem to find anything on how to turn on line numbering. Every example you have has numbers in it and it would be helpful for me to start using it. I’ve looked everywhere though! I am using the suggested Microsoft Visual C++ 2008 Express. This seemed like the best place to post this so I hope you will find it and help me out. Thanks!

    • Sorry it took me so long to respond. The line numbering is done on this website by a special plugin. I think you can get line numbers in MS C++ 2005 by going to Tools->Options, open Text Editor, select “All languages”, and check the line numbers checkbox.

      Not sure whether it was moved in C++ 2008 or not.

      • ntt

        The line numbering is turned on exactly the same way in the 2008 version.

        Thanks for a great tutorial. At last, a tutorial that treats you like a beginner not an idiot.

  • Pieter

    Damn, will have to wait to get home before i can get the IDE, can’t use up all the companies cap 🙂

  • Does anyone know why Code::Blocks is giving this error message?

  • Stefan

    > So is Eclipse ok?
    sure is ok, it’s quite professional, but is way too slow comparing to dev++ or code::blocks, but if that doesn’t mind you feel free to try NetBeans is way friendlyer in C++ comparing to eclipse.

  • thanks Alex for this great tutorial .
    i was learning JavaScript and i found c++ interesting subject.
    i hope your tutorial will help enough. thanks for sharing

  • Michael

    when i downloaded the Microsoft download thing it was ok but i opened it it kept saying lost connection to the server so i got bloodshed DEV-c++ instead i was wondering if this was the best choice besides Code::Blocks.

  • Dylan

    Whew! It took about an hour but I finally downloaded Xcode. I can’t wait to make my first program!

  • Another great section of the tutorial. Thanks for the feedback on which IDE is most helpful.

  • John

    Great job, I love the site so far. I’m hoping the next tutorials will be as easy to understand as these.

  • Masss

    Wow, this site is so amazing thus far, and I’m sure will continue to amaze me! I just had a question!

    In this tutorial, you suggest the download of Microsoft’s Visual C++ 2005 Express Edition for the window users, but what about this new 2008 version? Would it all work out the same way?

    Thank you for putting this site up.

  • I installed Microsoft Visual Studio Express 2008 and have tried the hello world program in this tutorial, but it dosent work, it says the system cannot find the path specified, (when i try to run it with ctrl f 5) also before that when i click on build solution it says the file is out of date, it also says that when i try to write “game” in the microsoft tutorial. Do you have any suggestions? Thanks!

    • I am not sure what would cause this. Sounds like some of your paths are set incorrectly. Does it compile and not execute? Or does it not even compile?

  • If anybody reading this is a linux newb like me using mandriva. You can just

    as root and then run it by typing codeblocks.

    And thanks for this awsome guide

  • Jamal

    Is that OK to install C++ Visual 2008 instead of 2005 which not available on microsoft site.

  • jestuart

    I have been looking for a site that taught C++ usuing MS Visual Studio. pops up when searching for C++ tutorials but didnt pop up for me when I was searching for C++ tutorials usuing MS Visual Studio. I am gald I read this far, because now I am excited. The site seems very upto date in content so far and is usuing the compiler and environment I was looking for.

  • Grant

    I will be installing XCode on my Mac ASAP!

    (does anyone read these things?)

Leave a Comment

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