CSC126

 

Logon name and password as described in Information Technology handout.

 

Open lab: lab schedules can be found at:   www.csi.cuny.edu/studenthelpdesk

 

 

Labs will be done using  Visual C++ 6.0.  Visual C++ 6.0 can be downloaded from MSDNAA via Quick Link from our departmental homepage www.cs.csi.cuny.edu.  Procedures are described under the Services link at the right hand side of the page. Visual C++ is also usually available at the library, and may be borrowed for a short time and installed on your home computer.  Make sure that you follow the regulations when using the software.

 

Information regarding this class can be found off the link from:  http://www.cs.csi.cuny.edu/~schanker

 

Getting Started on the PC:

 

1.      Double click the Visual C++ icon.  If you do not have it on your desktop, click the start icon, go to Programs, Visual Studio, Visual C++.

 

2.      You have now entered the Integrated Development Environment of Visual C++.  The editor window is the large window on your right.

 

3.      To create a new project, go to the top menu bar, and choose(click) File.  From the pull down menu choose New.

 

4.      If the Projects tab is not chosen, click on it now.  Then click on Win32 Console Application.

 

5.      Type the name of your project into the box for project name.  For our demo purposes the project name will be First.

 

6.      Choose An Empty Project, if it is not chosen, and click Finish.

 

 We now have an empty project, called FirstProject.

 

7.      Choose File, New, and with the File tab chosen, choose C++ Source File.  This will allow us to add a file to our project.

 

8.      Type the file name First into the box for file name.  Click OK, and you will be in the editor window (to the right). 

 

9.      Type the following source code into the editor window.

 

 

 

// File first.cpp

// Description:  Using Visual C++

// Programmer:  type your name here

// Type the current date here

 

#include <iostream>

using namespace std;

 

int  main()

{

     cout << "This is my first C++ program ";

 

     return 0;

}

 

10.  To compile,  choose Compile from the Build MiniBar, or hit CTL-F7.  To Build, choose Build from the Build MiniBar or hit F7.

 

11.  Remove the semicolon at the end of the line “This is my first C++ program”.  Build again.  Notice the error in the Output window.  Click on the error number to find the spot that is causing the error. (F1 will give context sensitive help)

 

12.  To see the Output Window more clearly, you may right click in the window, and choose Docking View.  To replace the Output window at the bottom of the screen, once again right click on the window and choose Docking View.

 

13.  Choose Execute from the Build menu to execute the program.

 

14.  To print the output click on the MSDOS icon, choose Edit, Mark, select (by clicking the left mouse button and holding it down while dragging)  all the output to be printed and hit enter.  The output has now been copied.

 

15.  Open a new file by using File and New and choose a text file.  Put a name in the text box.  Paste the output into the new file by right clicking the mouse and choosing paste.

 

16.   Your source code, text files, etc may be printed by using File, Print

 

17.   Save your source files, etc to your floppy disk by using File, Save As, or copy your source files onto the CD-RW given to you by Information Technology, using their directions.