23 lines
505 B
C++
23 lines
505 B
C++
|
#include <iostream>
|
||
|
#include <istream>
|
||
|
#include <ostream>
|
||
|
|
||
|
#include "Visit.hpp"
|
||
|
|
||
|
std::istream &operator>>(std::istream &in, Visit &visit) {
|
||
|
in >> visit.visit_id;
|
||
|
in >> visit.date;
|
||
|
in >> visit.doctor_first_name;
|
||
|
in >> visit.doctor_last_name;
|
||
|
return in;
|
||
|
}
|
||
|
|
||
|
std::ostream &operator<<(std::ostream &out, Visit &visit) {
|
||
|
auto v = visit;
|
||
|
out << v.visit_id << " " //
|
||
|
<< v.date << " " //
|
||
|
<< v.doctor_first_name << " " //
|
||
|
<< v.doctor_last_name;
|
||
|
return out;
|
||
|
}
|