C++ is a multi-paradigm programming language that supports object oriented programming (OOP) and other forms of pogramming as well. It was derived from the C programming language and was first implemented by AT&T in 1983. C++ is a strictly typed language, which means that Cat would not be the same as CAT or cat.

In order to make executables using the C++ you will need a compiler. For the purposes of this tutorial we will be using the Microsoft Visual Studio .NET 2005 programming environment. If you choose to use a different compiler, then I suggest you move onto the next tutorial. You can download Visual C++ for free here

Once you have Visual C++ installed go to File/New/Project then click Win32 then Win32 Console Application. Under name is where you will put the name of your project. Every project needs to have a unique name because all the files associated with your project will be going in the folder with that name. Then click OK.

New Project

Once you do that the application wizard comes up. Click application settings and select console application under Application Type and under Additional Options check Empty Project. Then click Finish.

Application Wizard

On your left will be a pane with the project name you chose. This pane is called the Solution Explorer. All the files that your program needs to run will show up here. All the folders are empty right now, but we need to add a file that we can write code in. Right click on the name you chose then select Add then New Item.

Solution Explorer

You should now be looking at an Add New Item screen. Since we want to be able to write code, click on code in the left pane. You should see some different types of files you can add. Among them are a C++ file (.CPP) and a Header file (.h) A header file is a file that contains functions written by other programmers. In C++ there are only a handful of built in functions, and many of the functions that other programming languages offer, C++ does not. To rectify this, however, there are headers that come with Visual C++ that we can take advantage of. Click on the C++ file (.CPP) because that's where all our code will go.

New Item

You should now be looking at a blank file with your cursor in it. This is where all the code will go.

Next Section: The skeleton
Twitter






Link Directory | link directory | GeekySpeaky: Submit Your Site! | Blog Matter

Copyright © 2004-2017 Sean Noble, All rights reserved
Read our Disclosure Policy