Advertisement
Guest User

Untitled

a guest
Apr 25th, 2015
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #include "Person.h"
  2.  
  3. using namespace BaptisteSchlienger;
  4.  
  5. Person::Person()
  6. {
  7. ;
  8. }
  9.  
  10. std::ostream& BaptisteSchlienger::operator << (std::ostream &stream, Person const &p)
  11. {
  12. stream << p.firstName << " "
  13. << p.lastName << " "
  14. << p.ageYears << " "
  15. << p.heightInches << " "
  16. << p.weightPounds;
  17. return stream;
  18. }
  19.  
  20. std::istream& BaptisteSchlienger::operator >> (std::istream &stream, Person &p)
  21. {
  22. stream >> p.firstName;
  23. stream.ignore();
  24. stream >> p.lastName;
  25. stream.ignore();
  26. stream >> p.ageYears;
  27. stream.ignore();
  28. stream >> p.heightInches;
  29. stream.ignore();
  30. stream >> p.weightPounds;
  31. return stream;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement