Search

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 2015. Note that Visual Studio 2015 does not come with the C++ compiler installed by default, so you’ll need to do a Custom installation and choose “Programming Languages -> Visual C++”. You can also uncheck the “Windows and Web Development” checkbox if you want to save some room, as you won’t need those for this tutorial series.

2) If disk space and/or download size are a challenge, then we recommend Microsoft’s free Visual Studio Express 2013 for Windows Desktop. When asked, choose “wdexpress_full.exe” and run it.

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, most references and screenshots are targeted to that version. Running any later versions (such as 2008, 2010, 2013, 2015, 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.

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

Mac OSX IDEs

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 CodeChef. Make sure you switch the compiler to “C++14 (G++ 4.9.2)”.

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
Index
0.4 -- Introduction to development

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

  • Grant

    I will be installing XCode on my Mac ASAP!

    (does anyone read these things?)

  • jestuart

    I have been looking for a site that taught C++ usuing MS Visual Studio. LearnCPP.com 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.

  • Jamal

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

  • 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

  • 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?

  • 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.

  • John

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

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

  • Dylan

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

  • 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.

  • 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

  • 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.

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

  • Pieter

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

  • 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.

  • 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++

  • 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

  • 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.

  • 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)

  • 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

  • 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 πŸ™‚

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

  • Mena

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

  • 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.

  • 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 πŸ™‚

  • 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 .

  • cheapy

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

    http://sourceforge.net/projects/orwelldevcpp/?source=dlp

    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.

  • jacwib

    This was the easiest step. Seriusly, i just did

    . That was easy.

  • Ethanicus

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

    • Alexandra

      Hello,
      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.

  • Alexandra

    Hey,
    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.

  • 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.

  • 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

  • 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\
    Projects\HelloWorlds\Debug\HelloWorlds.exe'.
    The system cannot find the file specified.

    I can't fix it by myself. Please help

  • Kevin You

    What is a C++ qt application?

    Can anyone help please?

  • 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.

  • 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?

    Thanks!

  • JSV

    Hi,

    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?

    Thanks!

    • 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.

  • SHEN

    HI ALEX! NICE LESSON , CAN U PLEASE TELL ME WHERE UR EXAMPLES WITH CODE BLOCKS ARE PLACED CAZ AM USING IT NOW AFTER UPDATE AM NOT ABLE TO FIND THEM

    • 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).

  • 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.

  • theodoros_1234

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

  • nan_00988

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

  • Batuhan

    i installed Visual C++ 2010 Express Edition

  • BananaCrysis

    Can I use Code Blocks to write programs for Windows?

  • Sparsh Jain

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

  • 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?

  • 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.

  • Olaf

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

  • 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.

  • 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.

  • GARRY

    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.

  • 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.

  • 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.

  • Niranjan.A.S

    can i use Visual Studio 2013 ultimate?

  • 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.

  • 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.

  • Jackson

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

  • Lourence

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

  • 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).

  • 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?

  • 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.

  • 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!

  • 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.

  • 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!

  • Joey

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

    Thanks

  • Hanna

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

    Great site, btw.

  • Alexander Terry

    Hay alex,

    Code::Blocks seems to have… stagnated. last update was in 2013. i found CodeLite( http://codelite.org/ ) 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.

  • 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

  • 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.

  • Ivan

    Hi,
    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.

  • 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.

  • 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.

  • 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?

  • Lucas

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

  • 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.

  • 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?

  • 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?

  • 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

  • Chester

    Hi!

    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?

    Thanks.

    • 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.

  • 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.

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

    • Alex

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

      • soham

        alex,
        try putting cpp.sh 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.

  • 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.

  • Qaiser

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

  • 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.

  • deepu

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

  • 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?

  • 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?

  • 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?

  • 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.
    Marie.

  • 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

  • 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.

  • 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.

  • Guy

    Thanks for this online C++ MasterClass πŸ™‚
    Already learned some new things.

  • 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?

  • 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.

  • 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.

  • DS

    Hi
    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.

  • 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.

  • 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 πŸ™‚

  • Luke

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

  • 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.

  • 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!

  • ZombieMcgiggles

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

  • It might be a good idea to put a link to an actual Xcode page rather than a page on Wikipedia.
    https://developer.apple.com/xcode/

  • 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?

  • 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 ?

  • 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.

  • Jimmy

    Hi!

    Ty for the guide, it’s really useful.

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

  • 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.

  • I’m using this to make tf2 mods

  • 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.

  • 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).

  • 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….

  • 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.

  • lahggg

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

  • 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.

  • Patrick

    Google and found a solution.

    Thanks

  • 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?

  • 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

  • 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.

  • 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
    Dr.Arulalan
    MD DCH  DNB

  • 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).

  • 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

    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.

  • 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.

  • Kenneth

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

  • Darren

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

  • roro

    Thanks! the tutorial is really great :B

  • Thanks

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

  • jebastin

    how much time will it take to install VS?

  • 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.

  • Jeffrey

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

  • UFO

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

  • Tunkeat

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

  • Shankar

    hi

    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.

  • 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)

  • 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?

  • Liviu

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

  • 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.

  • 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.

  • 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?

  • Sam the great

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

  • 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”.

  • 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?

  • 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.

  • 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"
      Wha?

      • 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.

  • 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.

  • reznov

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

  • 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.

  • 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 c++..as 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.

  • 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.

  • Garry E

    Alex:
    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.

  • 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

    Alex:
    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!

  • 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.

  • Liam

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

  • 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).

Leave a Comment

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