How to Create a C++ Project in Visual Studio
Introduction
This tutorial illustrates the steps for creating a new C++ project in Visual Studio. The process is consistent in Visual Studio 2003, Visual Studio 2005, Visual Studio 2008, and VS 2010. The screens vary somewhat, but this tutorial generally applies to all versions of Visual Studio. Entry level versions of Visual Studio software can be downloaded at no charge from Microsoft.com; look for the Express editions.
A project is a container that logically groups all programming source code and associated files that comprise an application or some other software end-product. Visual Studio supports many types of projects. Most programmers will use only a fraction of the wide variety of software end-products that can be created in Visual Studio.
Open Visual Studio and Click File / New / Project.
Step 02
Select Project Type C++
Select Template Empty
Project
Type in a descriptive name for the project
Click OK
Step 03
Open the Solution Explorer (On The Main Menu: View /
Solution Explorer)
Alternate-click (right-click) on The Source Files
folder
Select Add / New Item
Step 04
Under Category, select Code
Under Template, select C++ File
Type in a descriptive name for the file. Use main.cpp if the file
will contain the main function. Otherwise, use a name that describes the
contents of the file. C++ source code files should end in .cpp and
header files should end in .h
Click Add
Step 05
Create your documentation header (Flower Box).
Step 06
Create a source code file for the function (or class) and a header file for the function (or class). Your Solution Explorer should look like this.
Step 07
To runĀ your project, click Debug / Start Without Debugging. Visual Studio will compile, link, and execute for you.