Overloading Ostream Operator

  • + 0 comments
    ostream& operator<<(ostream& os, const Person& p) {
        os << "first_name=" << p.get_first_name() << ",last_name=" << p.get_last_name();
        return os;
    }