Here is the code that I will use to get my point across. It is an example from the book C++ Primer.
class HasPtr { public: HasPtr(const std::string &s