Unit III: Functions
- Notes for class III.1: Functions
- There are no notes for class III.2.
- Notes for class III.3: Call-by-reference
- Notes for class III.4: Headers, the math library and formatted output.
- Here's a sample program that
demonstrates some functions.
- Here's scribbler.zip, the
code that I gave you with labIII.2 where we used the Scribbler.
- swap.cpp is an example of using
- Here's dolly.cpp, which gives some
examples of formatted text.
- Here's precision.cpp, which
gives some other examples of formatted text.
This unit is on functions (which in C++ are also called "methods").
Chapter 4 of the textbook talks about functions. You should read
this. (This doesn't cover reference parameters, since the textbook
doesn't talk about those until it covers pointers in Chapter 6)