Compiling with Visual Studio Graphical Interface - Hello World
suggest change- Download and install Visual Studio Community 2015
- Open Visual Studio Community
- Click File -> New -> Project
![](/essential/cpp/img/4e4088212a4e71913867efe2073a46b1c79839e8.png)
- Click Templates -> Visual C++ -> Win32 Console Application and then name the project MyFirstProgram.
![](/essential/cpp/img/c02cb19fac9317f4138d7fdd78359d5ef288de15.png)
- Click Ok
- Click Next in the following window.
![](/essential/cpp/img/f60c5712a2e15d8381cbbecb4b52634620374e45.png)
- Check the
Empty project
box and then click Finish:
![](/essential/cpp/img/f6b68c139d14abdb94b6e819c64f049a3d245726.png)
- Right click on folder Source File then -> Add –> New Item :
![](/essential/cpp/img/65bc7ccee6b267f00580cf98ed60af334bbf0ac7.png)
- Select C++ File and name the file main.cpp, then click Add: 10: Copy and paste the following code in the new file main.cpp:
#include <iostream>
int main()
{
std::cout << "Hello World!\n";
return 0;
}
You environment should look like:
![](/essential/cpp/img/6b172092fc81833fd3c1049bf66058c2a9f8941f.png)
- Click Debug -> Start Without Debugging (or press ctrl + F5) :
![](/essential/cpp/img/f9dd3a9e5c871cb156b590e1ce94a1d81206d206.png)
- Done. You should get the following console output :
![](/essential/cpp/img/a21f106d37f3c763c9e30008620617ea523116d3.png)
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents