Posted: | Feb. 5, 2006 |
Due: | Feb. 10, 2006 |
touch Proj0.cpp
submit cs202 Proj0 Proj0.cpp
The command touch Proj0.cpp creates an empty file called Proj0.cpp.
The submit command has four parts: the word submit, followed by the class name (cs202), followed by
the name of the project (note uppercase P), followed by the name of the
file(s) to be submitted.
After entering these commands, you should get a confirmation that submit
worked okay. Specifically, the confirmation will say:
Submitting Proj0.cpp...OK
If not, send an e-mail to Ms. Wortman about the problem. In the e-mail, list the section of CMSC 202 in which you are enrolled. Please cut and paste the command you typed and the error message that was displayed into your message.
Now use touch and submit to create another file called bogus.cpp and submit it under Proj0.
You can check your submission by entering submitls cs202 Proj0
You should see the name of the file that you just submitted -- in this case,
Proj0.cpp.
#include <iostream> using namespace std; int main() { cout << "Hello World" << endl; return 0; }Save your Proj0.cpp and then submit it again (this will overwrite your original empty file).
Here's what your makefile should look like:
(Note: the <TAB> should be an actual TAB, not the letters... and there is
NO space after the tab - it MUST be the only thing on the line preceeding the
command)
Proj0: Proj0.cpp
<TAB>g++ -ansi -Wall -o Proj0 Proj0.cpp
Proj0 is the target (i.e. the name associated with this set of commands)
Proj0.cpp is the dependency (i.e. the files that are needed to build the target)
g++ (etc.) is the command to execute for that target
Make and run your project using the following two commands:
make Proj0
Proj0
"Hello World" should have printed. If you are having problems, please ask a friend, post to the message boards or come see a TA or your Instructor.
Submit your makefile.