COSC 1435 Lab 4

Purpose: This lab is in two parts, focusing on writing and compiling a simple C++ program written by the instructor, and exploring syntax errors.

Due: Beginning of Class, February 25, 2013

Requirements: Do the following:

Part 1. The first part of this lab involves writing, compiling, and running, a basic C++ program. We will start the lab by showing you how to compile a program in the CAMSLAB environment, this will be a simple program where I will give you the source code. We will also be configuring your computer to allow you to compile programs (for details of what we be doing see here). This program should be named 'lab04XXX.cpp', where XXX is your initials. Program names should not contain spaces and must have a '.cpp' file extension. This is to be a well documented program, including an identification section. This program must do the following:

Part 2. The second part of this lab has you make some common syntax errors to a program the instructor wrote and see the error messages that may result. You will be seeing similar error messages throughout the semester and you need to be able to recognize the meaning of the error and what you need to do to correct the error. The point of this exercise is to make an error in the syntax of the program and see the resulting error message the compiler gives you. As you write your own programs, this will help you recognize what needs to be fixed when the compiler gives a certain error message. Some of these changes will not cause an error.

Here is the example program 'example01.cpp'.

Program Submission. You will be submitting all programs to me and my grader via Blackboard. This is a large class and it is important to follow these instructions exactly. Failure to follow these instructions exactly will cause you to lose points on each lab. Do the following:

  1. Make sure you have all parts of the lab saved in a location that allows you to 'zip' them together.
  2. Place the following in your directory:
  3. Do not include the executable file to the email.
  4. 'Zip' all the files together into one file.
  5. Upload this file to Blackboard into Lab 4.

Grading Criteria: 100 points available for this lab.