diff options
author | Oskar <[email protected]> | 2024-09-18 16:12:27 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-09-18 16:12:27 +0200 |
commit | a10a6e35975660b89b465faf5baacd6df9c43a34 (patch) | |
tree | 7338cdde8a865904118be77dba5d6db949785680 /person.hpp | |
parent | 46dd78806ebac69c88cb07cecb3afae1835b783a (diff) |
more, 7.15 not started yet
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 |