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

01
of 10

Before you Install

Starting the Install dialog
You will need a PC running Windows 2000 Service Pack 4 or XP Service Pack 2, Windows Server 2003 with Service Pack 1, Windows 64 or Windows Vista. As this is a big download, ensure that you are up-to-date with your Windows Updates first.

You will also be required to register with Microsoft at the end of the process. If you have a Hotmail or Windows Live account already then use that. If not then you will need to sign up (it is free) for one.

You'll 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 download vcsetup.exe. It's under 3 MB. Save it somewhere then run it. Keep this file if you want to reinstall.

It will give you the option of submitting anonymously to help Microsoft improve the experience. I have no problems with this but it's your choice.

On the next page : Instructions for the download and install.

02
of 10

Download Visual C++ 2008 Express Edition

Visual C++ 2008 License terms

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.

On the next page : Install MSDN Express Library

03
of 10

Run and Register

Installing MSDN Express dialog
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.

Now Click the Next button.

On the next page : Preparing to Download

04
of 10

Preparing to Download

Before download check list
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. You'll probably have time to prepare a meal never mind a coffee break!

Check you have enough disk space free. As a general rule, Windows works best with at least 10-20% of the disk free and the occasional defragment. If you don't defrag now and then and if you delete and copy or create new files fairly frequently (such as this download) then files will be spread far and wide across your hard disk making it longer (and slower) to retrieve them. It's also reckoned to wear out disks quicker but that's difficult to quantify. Think of it as like a service for your car to keep it running well.

Now click the Install button.

On the next page : Watching the Download

05
of 10

Watching the Download and Install

Doing the download
This step will take a while depending on your internet connection speed and PC speed. But it will finish eventually and you will be able to play with Visual C++ 2008 Express.

This would be a good time to register a hotmail account with Microsoft if you haven't got one. It's a bit of a pain if you haven't got one but at least it's free and doesn't take too long too sign up. You need this so you can login to it when you register at the end. It's free but without it, Visual C++ 2008 Express will only give you a 30 day trial.

On the next page : Running VC++ for the first time

06
of 10

Running Visual C++ 2008 Express Edition for the First Time

Visual C++ 2008 Express Edition First Time

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.

On the next page : Compile and run your first C++ application.

07
of 10

Compiling a Sample Application "Hello World"

Creatingg a nEw Project
Do a File New Project it should look like the screen above then on the New Project Screen (Shown on the next page) select Win32 and Win32 Console Application on the right hand Window. Enter a name like ex1 in the Name: box.

Choose a location or go with the default and press Ok.

On the next page : Type in the Hello World Application

08
of 10

Type in the Hello World Application

New Project Screen
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;
 }
 
On the next page you'll see the default empty program. You can add the above lines manually or in the Visual C++ editor do a Select All (click Ctrl + A) then press delete to wipe out the lines. Now select the text above, do Ctrl+ C to copy it and then in the editor do Ctrl + V to paste it.

On the next page : Compile the program and run it.

09
of 10

Compile and run the Hello World Application

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 page 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.

That completes the installation. Now why not have a look at the C and C++ Tutorials.

10
of 10

Screen Dump of 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! That's just a minor cosmetic detail that slipped through their QA system I guess!