Start Visual Studio 2010.
Go to FILE/NEW/PROJECT
Choose C++, and a win32 Console Project. Give it a name.
This starts a wizard:
Click Next. On the second screen make sure you select the check boxes for Console and empty project.
Now you should see the following directory structure in the Solution Explorer:
Right click on the Source Files folder and choose new item. Choose a C++ code file and give it a name.
Now type in the following code. It makes a simple Hello world program. The include iostream adds a library with input and output objects such as cout and cin. Every C++ program must have a main method.
No comments:
Post a Comment