Skip to content
/Hello World in C++ using Visual Studio 2015
Hello World in C++ using Visual Studio 20152018-06-11T16:09:05-07:00

Visual Studio 2015 FAQ

How can we help?

Hello World in C++ using Visual Studio 2015

Thank you for downloading Visual Studio and start your first C++ journey!

  1. First, understand the layout and views once you launch Visual Studio 2015:screenshot of Visual Studio 2015
  2. Next, review the standard build process for a Visual Studio project: VS 2015 build process
  3. Now, start building your first C++ project by choosing the project template. If C++ is not an already installed language in Visual Studio, you need to install Visual C++ 2015 Tools for Windows Desktop:screenshot of Visual C++ 2015 Tool for Win Desktop
  4. After installing the Visual C++ 2015 Tools for Windows Desktop, you can choose the Win32 Console Application template and create your HelloWorld project:screenshot of Win32ConsoleApplication
  5. Click Finish to exit the Win32 Application Wizardscreenshot of Win32 Application Wizard
  6. You can see your first C++ project:screenshot of C++ project
  7. Replace the code with below lines:
    #include "stdafx.h"
    #include <iostream> 
    using namespace std;    
        int main()      
            cout << "Hello World! ";    
            return 0;      
  8. Next, add a breakpoint by clicking the grey area in front of line 12:breakpoint
  9. Compile and run your project by clicking the green triangle in the tool bar (Local Windows Debugger) or press F5. Visual Studio allows single-click for build and debugging.Click Yes to build the project:


  10. You can see a “Hello World!” in the console window.hello world


If the console window immediately closes, you need to set the breakpoint in step 8.

If you are on Windows 8.1, you need to re-run the installer for Visual Studio, click modify, select languages, and choose C++.

Congratulations on your first C++ project! Please let us know whether you find this article useful or not. Thank you!

Back to Support