Next: Check out your environment
Up: Assignment 1: UNIX intro
Previous: Get the C++ manual
- 1.
- Using netscape again, pick up the compressed version of the
stack example from the handout.
- 2.
- Uncompress the resulting file, then unpack it using tar.
The command is tar -xvf c++.tar.gz. It will print a list of the
files it is unpacking and create directory named c++example.
- 3.
- Use cd to move into the c++example directory, and type
ls to see what's there. Now type make stack to try to compile
the program. It will fail, and report that the command CC was
not found. CC is the C++ compiler, but it does not exist on
all the SGI machines. For now, it only exists on iris12.
- 4.
- Move into your iris12 window and cd into the c++examples
directory. Type make stack again. This time it should succeed.
- 5.
- Run the newly-compiled executable named stack. It should
print a bunch of numbers from 17 to 26 and back to 17.
- 6.
- Stop here and read the C++ handout, referring to the examples
you just set up. The UNIX commands to read the contents of a file are
cat and more.
Next: Check out your environment
Up: Assignment 1: UNIX intro
Previous: Get the C++ manual
Allen B. Downey
2/27/1998