C++ zyBooks Chapter 3 - User-Defined Functions

ECE 2620, Fall 2019


Table of Contents


1. Parameter with a Default Value

z3.4-default.cc


2. Default Parameter Values

only the last arguments can be omitted


3. Parameter Error Checking

z3.5-error.cc - cout vs. cerr; message vs. throw exception


4. Function Name Overloading

z3.6-overloading.cc

z3.6-swap.cc - bad swap functions using overloading


5. Pass by Value

z3.7-value.cc


6. Pass by Reference

z3.7-reference.cc