Visual C++ PAGE (4 of 5)

Introduction to Adobe Acrobat ?? Creating a Code File Running a Program

Building an Executable

Now that you have entered all of your source code, you should have a window that looks like:

You can now attempt to build your project.

Building involves compiling and linking into an executable.

Attempt to build the project, by hitting F7 or from the Build menu, select Build Day of the Week

Notice the compiler error messages in the lower window. Double click on an error message, and the line with the error will be indicated in the code window:

Now correct the errors relating to line 8:

and build the project again:

In case you can't figure out the errors here they are:

	Line 5:		change mon to month
			add the variable weekday
	Line 8: 	change the << to >>
			(we want to save the value to a variable, not write it to the output stream)
	Line 15:	change the { to } (we want to end the block, not start one)
	Line 16:	change weekDay to weekday to match the declaration
	Line 20:	change the < to <<

Continue correcting errors and rebuilding until you have no errors:

Once you get the project built, you are ready to run your program.

CS Dept Va Tech, 1997.

All rights reserved.