How to run a program at the school or from home
Software
The C compiler that is available at the school is part of Microsoft Visual
C++.
The labs that have Microsoft Visual C++ software are
-
PC413
-
PC411
-
PC322
-
BA150
-
The JCCL (ECS241)
There may be other labs that have this software.
You do not have to work on your programs at school if you have a C compiler
at home. You do not need to use Microsoft Visual C++. However, if you
use some other software, then it is your responsibility to make any modifications
to your source code before you hand it in so that it will run in Microsoft
Visual C++.
Creating a new project
If you follow my suggestion in Saving Source Files
below, then you will need to create a new project each time you want to work
on your project.
To start a new project in Microsoft Visual C++,
-
Select File from the menu
-
Select New from the pop-up menu
-
Select the Project tab
-
Select Win32 Console Application
-
Change the contents of the location box
-
In school labs other than the JCCL (ECS241): accept whatever is the default
value for the Location text box. However, write it down so
you know where your files are. Do not leave your files on the computer when
you are done, as someone could copy your homework. If homework assignments
are copied, then both will be given a zero. It is your responsibility to
be sure that no one has the chance to copy your files. So, be sure that you
follow the instructions about Saving Source Files below.
-
In the JCCL: change the Location text box to U:\.
-
From home: you may choose any directory for the Location.
-
Fill in the name of the project in the Project text box
-
Click the OK button
Opening a previous project
If you are working at home or in the JCCL, then you can use the same project
workspace over and over again.
-
Select File menu
-
Select Recent Workspaces
-
Select the name of the previous project
-
If you are working on the same file as the last time, then there is nothing
else to do. If you want to use this workspace to start a new project then
follow these steps.
-
In the left panel, click the tab for File View
-
Select the name of the old file
-
Press the Delete key. The file will still be saved, it is just being
deleted from the project.
-
Follow the steps below for adding a file to your workspace.
Adding a file to a new project
Once you have created a project, you will need to add your source file to
it. There are two possibilities
-
You are starting a new project, and need to create a new source file.
-
After you have opened or created the project, select Project from
the menu
-
Select Add To Project from the pop-up menu
-
Select New from the silde-out menu
-
Select C Source File
-
Fill in the File Name text box
-
Change the Location text box :
-
From school labs other than the JCCL (ECS241): Change the Location
text box to the A:\ directory. I recommend that you follow my suggestion
described in the Saving Source Files section below.
-
From the JCCL: select the project directory. It will be a subdirectory of
the U:\ drive.
-
From home: select the project directory. It could be anywhere on your system.
-
Click the OK button
-
The source file already exists and you want to add it to the project.
-
After you have created the project, select Project from the menu
-
Select Add To Project from the pop-up menu
-
Select Files from the silde-out menu
-
Click the arrow for the drop-down window at the top and select
-
From school labs other than the JCCL (ECS241): A:\
-
From the JCCL: select the previous project directory. It will be a subdirectory
of the U:\ drive.
-
From home: select the previous project directory. It could be anywhere on
your system.
-
Choose the name of your source file from the list that is displayed
-
Click the OK button
Saving Source Files
I recommend that you always save your source files on the A:\ drive when
you are working in a lab at school other than the JCCL.
However, do not save your project files on the A: drive, since there isn't
enough storage even for the simplest of C programs.
So, save the project information in teh default location, but save
your source files in A:\.
There is another issue at stake here: if you save your source (.c) files
in c: drive, then they will be accessible by the next person to use the computer
that you vacate. They could copy your code without your knowlege. However,
this doesn't exonerate you if your code is copied. Do not leave copies
of your source on the C: drive. The safest thing to do is to delete
your project file whenever you are vacating a computer
-
From the Start menu, select Programs
-
Select Windows Explorer
-
find the default directory where your project files are located
-
select the project directory that you were just working in
-
press the Shift-Delete key. This will delete the directory
without copying it to the recycle bin.
-
answer Yes To All or Yes for any prompts that you get