Computer Science I
MC140.01 / MC140.02
Quick & Dirty Code Warrior
- Install Code Warrior on your PC.
It is okay to use the "Academic Install", which requires
less disk space than the "Full Install".
Note, however, that the "Academic Install" does not install all of
the on-line manuals.
- Create a folder where you will keep your assignments,
- Start up Code Warrior, either by clicking on the
desktop called "CodeWarrior IDE", or by selecting from
the Start menu: "Start - Programs - CodeWarrior Pro 5 - CodeWarrior IDE".
- Create a new project.
Select "File - New - Win32 C/C++ Application Stationery".
Then enter ass1 in the "Project name" box.
Then in the "Location" box, select the folder you created in step 2,
with "/ass1" appended to it (e.g. mc140/ass1).
This may happen automatically when you enter ass1 as the project name.
Then click on "OK".
A window will pop up with some choices. Select "C Console App" and click on
Now your project has been created and the appropriate libraries have been
- Create your source code.
The automatic project creation step (above) creates one source code file
called "main.c", which contains the code for "Hello world", as we've done
This source code file will be what you pass in to be marked, so you need to
rename it from "main.c" to <your-user-name>-ass1.c.
This takes three steps. First you rename the file, second you add the file
to your project and third you remove the reference to "main.c" from your
In order to edit your source code, click on the "+" next to "Source".
Double click on the icon labeled <your-user-name>-ass1.c, and a window
will pop up containing a text editor.
- Close the project created in the step above
(in CodeWarrior, select "File - Close").
Next go out to your desktop and find your mc140 folder.
Inside, there will be a folder called ass1.
Inside the ass1 folder, there will be a file called main.c
(depending on how your folder view is set up, you may not see the ".c"
Click once on "main.c" and select "File - Rename", then type in
For example, I would type in sklarel-ass1.
Now close that folder and go to your CodeWarrior window.
- Inside CodeWarrior,
select "File - Open" and select the ass1 project ("ass1.mcp").
The project window pops up, containing three rows:
Source, MSL ANSI Libraries and Win32 SDK Libraries.
Click on "Source" once, to highlight it.
Now click on "Project - Add files".
Add the file <your-user-name>-ass1.
For example, I would add sklarel-ass1.
Click on "Add".
Then click on "OK" to add the file to both C Console App Debug and
C Console App Release.
Now the file has been added to Source.
If you click on the "+" next to Source, an icon labeled
<your-user-name>-ass1.c should appear.
- Click on the "+" next to Source, and an icon labeled "main.c" will appear.
Click on the "main.c" icon once, to highlight it.
Select "Edit - Delete", then click on "OK".
- Compile and link your program by selecting "Project - Make".
- Run your program by selecting "Project - Run".
- Submit your program by copying your source code file (only!!!)
(<your-user-name>-ass1.c) into my professor's folder.
Open the Professor's folders, as described below.
Double click the folder with my user name (sklarel).
Then copy and paste <your-user-name>-ass1.c into the appropriate
MC140 folder (MC140.01 for MWF 1pm or MC140.02 for MWF 2pm).