[Skip Navigation]
[CSUSB]
/ [CNS]
/ [CSE]
/ [R J Botting]
/[CS320 Course Materials]
[Text Version]
lab/03.html
Wed Apr 11 10:14:48 PDT 2012
Labs:
[01]
[02]
[03]
[04]
[05]
[06]
[07]
[08]
[09]
[10]
[11]
[12]
[13]
[14]
[15]
[16]
[17]
[18]
[19]
[20]
- Learn about lists in HTML.
- Review the compilation and editing of C++ programs.
By the end of the laboratory session I expect
to see on your web site
- Your home page (index.html) now has an ordered list<ol>...</ol> for CS320 Lab work.
- The first list item<li> should have an anchor <a...>...</a> referring to
a published C++ program.
- The published program should compile, run, and output a simple greeting.
- Start by downloading (shift click) this
[ 04.cpp ]
C++ program into one of your private directories.
- Have a look at it with the cat command:
cat 04.cpp
- Compile it using the g++ command:
g++ -o 04 04.cpp
- Run the output program (-o 04)
./04
- Edit the program so that it compiles, runs, and outputs a message:
vi 04.cpp
Note: you have to think, to do this step.
- Once the program works, copy the source code (04.cpp) to your
public directory:
cp 04.cpp ~/web
- Note: Never copy compiled C/C++ programs onto the web!
- Now you must add a list to your index.html page, that contains
a list for laboratory work. Use vi or other editor to add this
inside the <body>...</body> of your index.html page
and after any </pre> tag:
<h3>My CS320 Lab Work
</h3>
<ol>
<li>
<a href="http://cse.csusb.edu/public/your_group/your_identifier/04.cpp">A Simple C++ program</a>
</ol>
- Copy the index.html to your public space.
- Reload it and view it on the web.... and check the link.
- Call me over to earn credit.
Your score 0..10 will depend on how many of these steps you complete
between the end of the lecture and the end of the laboratory.
. . . . . . . . . ( end of section CSci320/lab/03 -- More HTML and a small bit of C++) <<Contents | End>>
[ ../04.html ]