std::ostream& operator<<(std::ostream& out, const Course& course) { out << course.getName(); // for example return out; }