Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Person.h"
- using namespace BaptisteSchlienger;
- Person::Person()
- {
- ;
- }
- std::ostream& BaptisteSchlienger::operator << (std::ostream &stream, Person const &p)
- {
- stream << p.firstName << " "
- << p.lastName << " "
- << p.ageYears << " "
- << p.heightInches << " "
- << p.weightPounds;
- return stream;
- }
- std::istream& BaptisteSchlienger::operator >> (std::istream &stream, Person &p)
- {
- stream >> p.firstName;
- stream.ignore();
- stream >> p.lastName;
- stream.ignore();
- stream >> p.ageYears;
- stream.ignore();
- stream >> p.heightInches;
- stream.ignore();
- stream >> p.weightPounds;
- return stream;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement