Lab 1: Building a Simple Project under Visual C++

COM1101 Winter 2001

Professor R. P. Futrelle
College of Computer Science, Northeastern U., Boston, MA

(Version of 12/31/2000)

LAB DATE AND TIME

The lab will be held on Tuesday, January 9th. If for any reason the date at which the labs are first opened is after this, then the exercise below should be completed at the very beginning of the Lab 2 session on January 16th. We will give you your lab section assignments (to Lab A, B or C) on Monday the 8th.

ATTENDANCE IS REQUIRED

Some of the students in this class have taken COM1100 from me in Fall 2000. Students who did not may not be familiar with the creation of a simple project in Visual C++. All students are required to attend this lab. Students who already know how to create these projects should help the students who are not familiar with the procedures, and not leave until those students have had success with the procedures. We will take attendance at this lab.

WHAT YOU ARE TO DO

The following assigment is to be completed within the lab hour and handed in, before you leave, to the TA, Ms. Shan. If you were in my class previously, you do not have to hand in anything. We will simply check our last Quarter's records to confirm your status and check your attendance at this lab.

Following the online instructions, create a simple "Empty Console" project under Visual C++. Enter the following source code and compile and run your program. (Copying and pasting from the browser is a reliable way to get a copy of the code.) Alter the source code below to include YOUR name and ID number. If you were not in my Fall class, you must hand in a hardcopy of your source code, floppy not required. Be sure that your program compiles and runs before you hand in your hardcopy and leave.

/* Bob Futrelle  (<-- change this)
 * ID: 123-45-6789 (<-- change this)
 * COM1101 (Prof. Futrelle)
 * January 9, 2001
*/

#include <iostream>
#include <string>

using namespace std;

void main() {

cout << "Hi there world!\n";

// depending on how you compile and run, you may need the following to 
// keep your DOS window from disappearing immediately after printing.

string s;
cout << "To quit, type any character, followed by a return.\n";
cin >> s;
}