Visual C++ 6.0 Tutorial

Welcome to CSCI 195.  This tutorial guides you through the process of creating a simple console application using Visual C++ 6.0.  A version of this tutorial is also available for Visual Studio .NET 2003.

Step 1: Creating a New Project

Using Windows Explorer create a folder to hold all of your projects for this class.  In this example I have named mine A:\PROJ.  You can name your folder anything you like.  Once you have created your folder close Windows Explorer.

 

Start Microsoft Visual C++ using the Start button from Windows
You should see a screen similar to the the following image:

vcscreen01.jpg (80879 bytes)

 

Click the menu item File|New... or press CTRL-N

A dialog box is displayed.  Select Win32 Console Application on the left.  Then, next to the Location: text box, click on the button to browse to the folder you created in the last step.  Finally, in the Project name: text box, enter hello.

The screen should look like this:

vcscreen02.jpg (142546 bytes)

 

Click the OK button to continue.  You should see the following screen:

vcscreen03.jpg (142120 bytes)

 

Click the Finish button to create your new project.  You should see the following screen displaying information about your project:

vcscreen04.jpg (112989 bytes)

 

Click the OK button to continue.  You should see the following screen:

vcscreen05.jpg (91196 bytes)

 

Step 2: Typing your Program Code

Click the menu item Project |Add To Project | New...

vcscreen07.jpg (104993 bytes)

 

Select  C++ Source File from the list on the left and type the name hello in the text box labeled File Name:

vcscreen08.jpg (138633 bytes)

 

Click the OK button to enter the edit mode.  You should see the following screen:

vcscreen11.jpg (96287 bytes)

 

Enter the following program:

Once you have typed the program in the edit window, your screen should look like this:

vcscreen12.jpg (237107 bytes)

 

Save your program by clicking on the icon that looks like a floppy disk (3rd icon from the left).

 

Step 3: Executing Your Program

To execute your program click on the button toward the right that is labeled !

The following message box will appear:

vcscreen09.jpg (133958 bytes)

 

Click the Yes button and your program will compile and execute.  You should eventually see the following screen:

vcscreen14.jpg (215264 bytes)

 

Type your name when prompted and then press Enter.  You should see the following screen.

vcscreen13.jpg (244598 bytes)

 

Once you recover from the awe of creating your first C++ program you can press any key to make the console window disappear.

 

That's it!  You've created your first C++ project.

 

 

 

 

Hit Counter