How to Create a C++ Project in Visual Studio
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.
Select Project Type C++
Select Template Empty Project
Type in a descriptive name for the project
Open the Solution Explorer (On The Main Menu: View /
Alternate-click (right-click) on The Source Files folder
Select Add / New Item
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
Create your documentation header (Flower Box).
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.
To run your project, click Debug / Start Without Debugging. Visual Studio will compile, link, and execute for you.
Visual Studio Products
More by this Author
We could nag, but this is better. It is less work for us to use the words of others to emphasize the importance of doing laundry. Besides, if you saw the way we dressed, you'd laugh your mouse off.
Ever been to a NASCAR race? I thought not. Here are my top 10 reasons why NASCAR racing doesn't rock.
Data Hiding is an aspect of Object Oriented Programming (OOP) that allows developers to protect private data and hide implementation details. In this tutorial we examine basic data hiding techniques in Java.