9.10 — Pass by address (part 2)

This lesson is a continuation of . Pass by address for “optional” arguments One of the more common uses for pass by address is to allow a function to accept an “optional” argument. This is easier to illustrate by example than to describe: #include <iostream> #include <string> void greet(std::string* name=nullptr) …