Compiling with Visual Studio Graphical Interface - Hello World
suggest change-
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.cppas in the later steps. -
Open Visual Studio Community
-
Click File -> New -> Project
-
Click Templates -> Visual C++ -> Win32 Console Application and then name the project MyFirstProgram.
-
Click Ok
-
Click Next in the following window.
-
Check the
Empty projectbox and then click Finish: -
Right-click the Source Files folder, then choose Add –> New Item:
-
Select C++ File, name the file
main.cpp, then click Add. -
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:
-
Click Debug -> Start Without Debugging (or press ctrl + F5) :
-
Done. You should get the following console output :