Note that this offer does not include making up attendance. Each lab (except for lab 1) is worth 20 points; 15 for completing the lab and 5 for attendance. If you did not attend lab 2 or lab 3, you will only be able to make up the 15 non-attendance points.
The computer will shutdown and then restart. At the boot prompt, you need to indicate you want the computer to boot Linux instead of Windows. Your TA will tell you what to type to do this.
Once the computer is booted into Linux, you will need to login using the same user name and password as you would for Windows. You will notice that Linux uses a GUI (graphical user interface), though it is not as nice as Windows (at least in my opinion). However, in order to compile your program, you will need to use a command-line interface, so you will need to open a shell. This is simply a window where you can type in commands (similar to opening up a MS-DOS window under Windows). Your TA will tell you how to do this.
Like MS-DOS, the cd command is used to change to another directory. For example, you should have a directory called lab3 (or something similar), in which you have last week's lab files. To change to this directory, type in cd lab3 and hit return. (Note that if the directory name contains a space, such as lab 3, you must use double-quotes when typing the name; i.e. cd "lab 3".) Type in ls again; this time you should see your lab 3 C++ file, along with any other files and directories within this directory. Finally, type cd by itself to return to your home directory.
Next, copy your C++ program file from lab3 into this directory. To do this, type cp ../lab3/lab3.cpp lab4.cpp and hit return. Note that this command assumes your lab 3 directory is called lab3 and that your lab 3 C++ program file is called lab3.cpp. If this is not the case, modify the this command accordingly. For example, if your C++ file is called main.cpp, you would type in cp ../lab3/main.cpp lab4.cpp instead.
If there are any errors listed, you will need to fix them. Most likely you will not have any, since you have already compiled this program under Visual C++. However, there are some differences between these compilers, so it is possible that something in your code that did not cause an error under Visual C++ will be reported as an error under g++.
To fix any errors reported, will need to edit lab4.cpp. You have (at least) 3 choices for editing files under Linux: emacs, vi, and pico. emacs is the most powerful of the 3, vi is also pretty powerful, but pico is the easiest to use, so I recommend (for this week at least) you simply use pico.
To edit your file using pico, type in pico lab4.cpp and hit return. You should see your program loaded into the editor, along with 2 bars of commands listed at the bottom. The most important command is ^X, which stands for CONTROL-x. This command allows you to exit the editor. If you have made any changes, you will be asked if you want to save them or not.
If you did have any compilation errors, use pico to edit lab4.cpp to correct the problem, then compile the file again (by typing g++ lab4.cpp). Do this until you have no compilation errors and the a.out file is created.
Even if you did not have any compilation errors, edit your program with pico just to get a feel for it. Don't worry about making unwanted changes since when you exit pico, it will ask you whether you want to save your changes; if you do not, simply say no.