#include "Person.h" #include Person::Person(): name{""} {} Person::Person(std::string const& name): name{name} {} std::string Person::to_string() const { return name; } Person Person::operator+(std::string const& rhs) const { return Person{ name + rhs }; } Person& Person::operator++() { name += name; return *this; } Person Person::operator++(int) { Person old{*this}; ++(*this); return old; } std::ostream& operator<<(std::ostream & lhs, Person const& rhs) { lhs << rhs.to_string(); return lhs; }