summaryrefslogtreecommitdiff
path: root/person.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'person.hpp')
-rw-r--r--person.hpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/person.hpp b/person.hpp
index 66ec7f0..9d1e7ea 100644
--- a/person.hpp
+++ b/person.hpp
@@ -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