Point value: 10
Date due: send email (using
mail utility) to your lab instructor by 11:59pm Fri, Sep 8
This exercise is designed to introduce you to
Editing a File Using Emacs
- editing a file with emacs
- C++ comments
- Login to your cs account (Linux).
- Adding comments to a C++ program
- Open a new terminal window and
start editing the program file from Exercise #1 by typing:
- A comment is a non-executable
statement that provides information about a program to a
reader. A comment begins with two forward slashes (//). The
remainder of the line will be ignored by the compiler (g++).
- Place a comment at the start
of the program file (above #include
<iostream>). The comment should contain your name,
lecture and lab section #s, and the exercise #.
- Save your changes (Ctrl-x,
- Open another terminal window
and try to compile the program.
- If it does not compile, read
the error message(s) and go back to the terminal window with
emacs. Make the appropriate changes and save. Continue this
process until the program compiles.
- Run your program to confirm
that it still works.
- When you have finished editing
your file, exit emacs with (Ctrl-x, Ctrl-c).
- Use the mail utility to email your
program file (with the comment) to your lab instructor. Make
sure that the subject line of your message includes your name,
lab and lecture section #s, and exercise #. Remember to send
from bobby.cs.unlv.edu (compile and run on bobby before