Lab 1
The purpose of this lab is to allow you to create a simple program,
compile it and run it.
When you finish this lab you should:
- Log into the unix environment.
- Start the Graphical User Interface.
- Use an editor to create a program.
- Use a compiler to produce an executable.
- Email source code to me.
In addition you should understand somewhat what you are doing and how to
obtain further help.
- Log into one of the machines in the lab running linux
- copy your xstartup script
- You need to copy a file from my directory to yours,
- to do this you use the unix copy command.
- the format is cp sourcefile destinationfile
- In this case you need to type
cp ~dbennett/.xinitrc .
- type startx
- Start an editor, this is the button at the bottom of the task bar that
looks like a notpad.
-
- Enter the code from the program on page 70 (change the names and such)
- Save your program as lab1.C
- Start a terminal emulator (the computer with a shell on it) to run the compiler in.
- Compile the code, fix errors, compile
- g++ -o lab1 lab1.C
- Add comments describing this as lab 1, and other documentation.
- Email the final .C file to dbennett@edinboro.edu, call it lab1