170 likes | 269 Views
C Pre-Course Workshop. Terence Lee csterence@comp.polyu.edu.hk QT406 -> PQ607 http://www.comp.polyu.edu.hk/cws2004 http://www4.comp.polyu.edu.hk/~csterence/cpcw/. Login Novell. Do not click “Workstation only” Show “Advanced Menu” Click “Advanced” Button if not showing up Change context
E N D
C Pre-Course Workshop Terence Lee csterence@comp.polyu.edu.hk QT406 -> PQ607 http://www.comp.polyu.edu.hk/cws2004 http://www4.comp.polyu.edu.hk/~csterence/cpcw/
Login Novell • Do not click “Workstation only” • Show “Advanced Menu” • Click “Advanced” Button if not showing up • Change context • Click “Context” button • Expand COMP – STUDENT – USER • Select “SC” • Click “OK” • Key in Username / Password • Username : cwsXXX (where XXX will be assigned individually) • Password : cp2004pre • Click “OK” button to login
Work Space Environment • Your own server disk space is in J: • This work space will be used for whole workshop • Your own files in local hard disk will be deleted after re-boot • All files and directory will be deleted after the workshop
Development Environment • Start Menu • Programs • Microsoft Visual Studio.Net • Microsoft Visual Studio.Net
Open a New Project (1) • Click “New Project” button • Or “File” – “New” – “Project”
Open a New Project (2) • Select Visual C++ Project • Choose Win32 Project • Enter Name (MyProject) • Change the location to J:\ • click “OK” button
Open a New Project (3) • Click “Application Settings” • Change to “Console Application” • Check “Empty Project” • Click “Finish”
Create Your Program (1) • In Solution Explorer on Right Hand Side • Right click “Source Files” • Choose “Add” - “Add New Items”
Create Your Program (2) • Choose “C++ Files (.cpp)” • Enter Name • Keep Location unchanged • Click “Open”
Create Your Program (3) Enter your program and Save it. Note the quotation marks!
Try Your Program Select “Debug” – “Start without Debugging If prompt, click “Yes” to build the Project
Result Press any key to return To the Editor
Build Your Project • Choose “Build” • Select “Build MyProject”
Execute Your Program (1) • Open a Command Prompt
Execute Your Program (2) • Type “J:” to change to drive J: • Type “cd MyProject” to changed to your project directory • Type “cd debug” to change to your program debug directory • Type “dir” to display what files are created (Most Important one is “MyProject.exe”) • Type “MyProject” to execute your program
Note After modifying your program, Windows may prompt you your Program has been modified. Just click “Yes” or “Yes to All” To reload the changed program After certain compilation errors And program modifications, It is suggested to Clean the Project Before the next compilation/build.
Turbo C Compiler http://www.pitt.edu/~stephenp/misc/turboC.exe