So, let’s tackle the problem of argument errors with area(). We have two obvious alternatives: a. Let the caller of area() deal with bad arguments. b. Let area() (the called function) deal with bad arguments.
Cpp
my conspect of the Stroustrup C++ book. + additional C++ topics.