diff options
Autocommit at 07.05.2022 @ 16:33
1 files changed, 13 insertions, 3 deletions
| -rw-r--r-- | src/Models/Event.cpp | 16 |
diff --git a/src/Models/Event.cpp b/src/Models/Event.cpp index d86b907..71bf63a 100644 --- a/src/Models/Event.cpp +++ b/src/Models/Event.cpp @@ -29,11 +29,21 @@ const Date& Event::get_date() const { return date; } -void Event::print(std::ostream& ostr) { - ostr.write(hall, sizeof(hall)); +void Event::read(std::istream& istr) { + hall.read(istr); + name.read(istr); + date.read(istr); + tickets.read(istr); + reservations.read(istr); } -void Event::write(std::istream& istr); +void Event::write(std::ostream& ostr) { + hall.write(ostr); + name.write(ostr); + date.write(ostr); + tickets.write(ostr); + reservations.write(ostr); +} int Event::compare(const Event& other) { if (hall == other.hall) |
