Lecture 2
Today: From C to C++
Assigned Reading: Chapter 1 in the textbook (Software engineering).
- Administrative: TA hours on Sunday night instead of Monday?
- Grading. Criteria for readability. Header: name, class
account, hwk number, what the program does. Comments.
- Examples in the book, page
4,6. Discussion.
Organization of the program: functions before main; function
prototypes before main, then main, then function code.
- A (brief) review of functions in C and C++.
- Header files. Discussion: Examples from
textbook.
- In-class exercise: modify the dice program 2 (cx1-2.cpp) so
to contain the functions after the main function. Use function
prototypes.
Edit for readability.
Discussion of Hw1