Now you may be wondering, “What does this hello world program look like?”. To test it, download the Microsoft Visual C++ compiler Express edition at:
http://msdn.microsoft.com/vstudio/express/visualc/
This is free permanently!
Okay, now that you’ve downloaded your compiler (I’m assuming you have), launch the program. There are a few things you need to know. First you will need to register. This is pretty painless, and you get to download free icons and stock pictures. In addition, your user days are numbered if you don’t register, and eventually, Microsoft won’t let you use it until you register. How’s that for incentive?
Next, click “File”, “New”, “Project…”. There will be a pop-up window. Make sure that at the left “Win32″ is selected. Under a “Visual Studio installed templates” section, click on “Win32 Console Application”. For the name input box at the bottom, type whatever you want to name this, although “helloWorld” is recommended. Under that, type in (or browse) where you want to save this. I recommend either the desktop or something along the lines of “C:\My Documents\Visual Studio 2005\Projects”, depending on where the “My Documents” folder is. Press “OK”. There will be another pop-up window. Click “Finish”.
Now for testing.
Copy this into the part of the page that has a lot of complex code in it (replace all the complex code):
/*
* File: helloWorld.cpp
* Author: Lietk12
* Description:
* This program prints the message
* “Hello, World!” on the screen.
*/
#include “stdafx.h”
#include <stdio.h>
void main()
{
printf (”Hello, World!\n”);
}
When you’re done with that, click on the “Build” menu at the top, then click “Build Solution”. There will be a new thing that is called “output”. It tells you if there are any problems with the program. “Building” is basically making the program from the source code. If there are any problems with this program, post a comment or email me (I’m not sure how you would do that, unless I know you).
If it builds successfully, click the “Debug” menu and then click “Start without debugging”. It should launch the program.
Any questions?


0 Responses to “C++ compiler”