Compiling with Visual Studio Graphical Interface - Hello World

suggest change
  1. Download and install Visual Studio Community. The wizard below is the Visual Studio 2015 Win32 Console Application wizard. In a current Visual Studio release, create an empty C++ console project, then add main.cpp as in the later steps.

  2. Open Visual Studio Community

  3. Click File -> New -> Project

  4. Click Templates -> Visual C++ -> Win32 Console Application and then name the project MyFirstProgram.

  5. Click Ok

  6. Click Next in the following window.

  7. Check the Empty project box and then click Finish:

  8. Right-click the Source Files folder, then choose Add –> New Item:

  9. Select C++ File, name the file main.cpp, then click Add.

  10. Copy and paste the following code into the new file main.cpp:

    #include <iostream>
    
    int main()
    {
        std::cout << "Hello World!\n";
        return 0;
    }
    

    Your environment should look like:

  11. Click Debug -> Start Without Debugging (or press ctrl + F5) :

  12. Done. You should get the following console output :

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents