Week 05

Lecture slides (Functions Part 2)

Lecture slides (Multiple File Compilation)

Functions with References and Pointers (Oh My!)

07.1-swapRef.cpp

07.2-swapPointer.cpp

07.3-constRefParamCircleArea.cpp

Overloaded Functions

07.4-defaults.cpp

07.5-func_sigs.cpp

07.6-matching.cpp

Note: the return type of a function is not part of a function’s signature. If two functions only differ by return type, it is ambiguous which function should be invoked, and hence raises a compile-time error. Apologies for the confusion.

Templates

07.7-templateFunction.cpp

07.8-forceTemplate.cpp

Multiple File Compilation

09.1-main.cpp

09.1-support.cpp

09.1-support.h

Multiple File Compilation Continued

09.2-main.cpp

09.2-functions.cpp

09.2-functions.h