- Declare following functions in
includes/max/max.h
- Implement following functions in
includes/max/max.cpp
The Max function with three arguments will call the Max function with two arguments to do the heavy lifting. We do not want to be repeating the code. In other words, the Max(a, b, c)
will call Max(a, b)
. Please note: Max(a, b, c) contains no conditionals.
- if you call functions
max()
, you will get duplicate name errors or ambiguous name errors, so call themMax()
.