How to download and Install C++.pdf






Full text


Instructions for Downloading and installing Visual C++ 2008 Express Edition

 Before you Install

You will need a reasonably fast Internet connection to the PC where you are going to install Visual C++ 2008 Express Edition. Dial-up will take too long for a download that's nearly 80MB without MDSN or over 300 MB with it.

Starting the Download

Go to the Visual Express Download Page and click on the Visual C++ Express logo. That will


You may get asked to install prerequisites if your PC doesn't have the .NET 3.5 framework and MSDN, or 68Mb for just the C++ Part. You might want to do this early in the morning for faster download speed. It gets slower during the day.

You won't need the Platform SDK now but you might find it useful in the future. You'll have to agree to the usual license terms of course.

You'll get the option of installing the MSDN Express library. If you are also installing Visual C# 2008 Express then you only need the MSDN Express library to be downloaded once. You will need the MSDN for the integrated help etc. Don't even think of not downloading at least one copy! There is an amazing amount of help, examples and samples in the MSDN library that make it well worth the big download.


You're almost ready to download and install. This is one of the slower bits particularly if you have selected MSDN and/or the SDK.

Now click the Install button.


After downloading and Installing, run Visual C++ 2008 Express Edition. This will try to connect to the internet to check for updates and new downloads. When you run it the first-time, it will take a few minutes registering components and configuring itself to run and you'll see the dialog appear while it's busy.

You now have 30 days to register to get a registration key. The key will be emailed to you within a few

minutes. Once you have it, run Visual C++ 2008 Express Edition, hit Help and Register Product then enter your registration code.

 Compiling a Sample Application "Hello World"


This is the source of the first application. // ex1.cpp : Defines the entry point for the console application.

#include "stdafx.h"

#include <iostream>

int _tmain(int argc, _TCHAR* argv[])

{ std::cout << "Hello World" << std::endl;

return 0; }


Now press the F7 key to compile it or click on the Build Menu and click Build Ex1. That will take a few seconds and you should see ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

If there are any failures, view the lines, correct them - it's most likely a mistyped character and recompile again. After a successful compilation, click on the line that says return 0 and press the F9 key. It should put a small circular arrow in the margin. That's a breakpoint. Now press F5 and the program should run until it hits the line where you pressed F9.

You should be able to click the black box where the output of the application goes and see the Hello World message in the top left corner. On the next picture you'll see a screen dump of this.

Now select Visual C++ again, and press F5 again. The program will run to completion and the output window will vanish. If we hadn't created a break point you wouldn't have seen the output.

Note: - If you run Visual C++ 2008 Express Edition from the Start menu, you may see it as Visual C++ 9.0

Express Edition on the top menu and Microsoft Visual C++ 2008 Express Edition on the sub menu that launches it!