CS207-HW3/Visit.cpp

23 lines
505 B
C++
Raw Permalink Normal View History

2024-12-04 08:51:16 +00:00
#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;
}