blob: 9d1e7ea435a214f229131732d1c311f80c705b8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#ifndef PERSON_H
#define PERSON_H
#include <string>
#include <vector>
struct Person {
std::string Name;
std::string Address;
std::string GetAddress() const { return Address; }
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
|