Week 4 Announcements

CS-150, Fall ’02, Dr. C. S.Tritt

 

The following tips and suggestions are for your benefit. You will not be tested on this material and it is not a major problem if you don’t even understand it.

 

Running program from the “MS-DOS” command prompt (a.k.a., console window) –

 

Open a console window by selecting Start | Programs | Accessories | Command Prompt. Next,  “go to” the folder containing your compiled program using cd commands. For example, cd cs150\MyProject\Debug. Then, enter the program name to run it. When you are finished with a console window, enter exit to close it and return to the Windows environment.

 

You can also change directories one step at a time such as cd cs150, cd MyProject, cd Debug. You may also find the dir (directory) command useful for displaying folder contents in the command window. If you need to change the default drive letter, just enter the letter of the desired drive (for example, d:.

 

Changing console colors –

 

To change the colors of a console window right click on the title bar of the window and select properties. Select the Colors tab and adjust the screen text and background colors to your liking. You may be prompted regarding apply this change to just the current window or to all similar windows (by modifying the shortcut that created the window).

 

Deleting unneeded files –

 

The Visual C++ compiler generates many temporary files during the compilation process. These files are not automatically deleted. To manually delete them, select Build | Clean while in the IDE.

 

Backing up projects –

 

At times, you may want to copy, move or backup your C++ programs. While all your source code is in the .cpp file that is part of your project, Visual C++ needs additional information to compile, link and run your program. This information is stored in the various work space and project files (having extensions like .dsw, .dsp, .ncb and .opt). As a result, it is best to copy (or move or backup) the entire contents of the folder containing your project. It is not necessary to copy the contents of the Debug or Release subfolders in project folders, as these are regenerated every time projects are compiled.