24 lines
528 B
C++
24 lines
528 B
C++
#include <iostream>
|
|
#include <istream>
|
|
#include <ostream>
|
|
#include <sys/types.h>
|
|
|
|
#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;
|
|
}
|