|You can install for free Visual Studio 2010 express. Do not install the professional trial version.
Click Visual C++ 2010 express
Click (English)Language in the dropdown box
If you get ” Internet explorer blocked the site from downloading” Click down load file and repeat procedure 1 and 2 ( fig 1) NOTE: you have about six seconds to click down load file or Microsoft’s web page will say thank you for downloading but does not give you the download menu. You will have to arrow back and repeat procedure 1-3.
Wait for download file to appear (fig. 2) save to desktop.
Close internet explorer
Find exe file (fig. 3) on desktop and click to start; follow directions
Getting started with visual studio 2010; “Hello world” with #include “std_lib_facilities.h”
Go to APPEDIX C and follow C.3.1 Creating a new project
Follow steps C.3.3 creating source code first (see step 3 for alternative method) and then c.3.2 (see step 6)
Alternative way to add source file instead of following C.3.3 in book
Right click on source files and click add New Item (fig. 4)
Click on C++ file (.ccp) and give file a name; Click add(fig. 5)
Open Standard library access header from http://www.stroustrup.com/Programming/
and Copy to Notepad. Save as std_lib_facilities (fig. 6)
For your program to work you must create a header file from your saved std_lib_facilities text file.
With your first Hello World program opened, you must past a copy of your std_lib_facilities text file to the header folder. (fig. 7, fig. 8) NOTE: there are better ways but I found this easy for people who are creating their first program.
You must now rename your file extension, instead of .txt change the extension to .h (fig. 9)
Right click on std_lib_facilities and click rename; remove the txt and insert h, you will see it changes to a .h header file( fig. 10)
You will need to copy this new std_lib_facilities.h (fig. 11) and place it in Visual Studio 2010 folder (fig. 12) you will see the file type is now a C/C++ header (fig. 12)
How to make it work?
Depending on where you placed your std_lib_facilities .h file, you will need to add one two or three ” ../”. The file was put in the Visual Studio 2010 folder, (fig.12) so we will need to add three ”../ “. Fig.13
Your program #include should look like this #include "../../../std_lib_facilities.h" fig. 14.
Make sure there are no spaces between “ ” . "../../../std_lib_facilities.h"
Note: If you put a copy in your projects folder it will look like this
If you put a copy in your Hello world file folder (folders you create each time to start a new project) it will look like this #include "../std_lib_facilities.h"
If you put a copy in your Hello world file folder (folders where your .cpp file is stored), it will look like this
I hope this helps. Experiment and prove this to yourself