diff options
Diffstat (limited to 'person.hpp')
-rw-r--r-- | person.hpp | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1,6 +1,7 @@ #ifndef PERSON_H #define PERSON_H #include <string> +#include <vector> struct Person { std::string Name; @@ -9,4 +10,17 @@ struct Person { std::string GetName() const { return Name; } }; +std::istream &read(std::istream &pcin, Person &p1) { + + std::getline(pcin, p1.Name); + std::getline(pcin, p1.Address); + return pcin; +} + +std::ostream &print(std::ostream &pcout, const Person &p1) { + + pcout << p1.GetName() << "\n" << p1.GetAddress(); + return pcout; +} + #endif |