Homework 2
Spring 2000
Written due in 2nd lecture of week Jan 24-28
E-mail due: Jan 25 @ 5 PM
5 points
This homework is designed to get you familiar with entering and compiling C++ programs in a UNIX environment, something we'll do a lot of this semester.
You can find the GNU g++ compiler on either gusun or cssun, which are UNIX machines. You can telnet to these machines from the Internet or from a Win95 machine on the campus network.
The editors on gusun and cssun are named ``vi'', which is a full-screen editor, and ``pico'', which is also a full-screen editor. The documentation for these editors is avilable on-line. For vi, type at the UNIX prompt ``man vi''. For pico, once inside the editor, you can type Control-G to get help. Note that vedit is a version of vi that is intended for beginners. You could also enter the source code on a Win95 machine and ftp it into your account on one of the UNIX machines.
We'll cover much of this in the therapy sessions held this week.
Note: For problem 2.8, remove both include statements.
For example, if the last four digits of your student ID is 1234, the name of your source file is prog211.cc, and your TA's e-mail address is ``imagoodta@georgetown.edu'', then you would type at the UNIX prompt:
gusun% mailx -s "1234.cc" imagoodta@georgetown.edu < prog211.ccYou are executing the mailx command. The -s option indicates that the string "1234.cc" is the subject heading. imgagoodta@georgetown.edu is the address to which the mail will be sent. The part ``< prog211.cc'' takes your source file and directs it into the mailx command.
You can also use pine to submit your project. After filling in the To and Subject fields (no spaces before or after), type the ^R command in the MESSAGE TEXT screen. Pine will ask for a file name (e.g., proj211.cc), which it will then load as your message text. Type ^X to send the e-mail to your TA.
You must e-mail your project before 5:00 P.M. on the due date.