uni

University stuff
git clone git://git.christosmarg.xyz/uni-assignments.git
Log | Files | Refs | README | LICENSE

commit cd1494021b9b8e13bd3b6570fddfe2027a018a3f
parent 32394d8bdde97015b104037cf1f062b2063873db
Author: Christos Margiolis <christos@margiolis.net>
Date:   Tue,  5 May 2020 00:50:36 +0300

modified << overload

Diffstat:
Massignment-2.2-classes/classes.cpp | 15+++++++++------
Aassignment3.tar.gz | 0
2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/assignment-2.2-classes/classes.cpp b/assignment-2.2-classes/classes.cpp @@ -179,12 +179,7 @@ float Student::calc_average() const else return 0.0f; } -std::ostream& operator<< (std::ostream& stream, const Student& s) -{ - return stream << "AM: " << s.get_AM() << std::endl << "Name: " << s.get_name() << std::endl - << "Semester: " << s.get_semester() << std::endl; -} - +std::ostream& operator<< (std::ostream& stream, const Student& s); static void cont(void); static void constructor1(const Student& s1); static void ostream_overload(const Student& s1); @@ -227,6 +222,14 @@ int main(int argc, char **argv) return 0; } +std::ostream& operator<< (std::ostream& stream, const Student& s) +{ + return stream << + "AM: " << s.get_AM() << std::endl << + "Name: " << s.get_name() << std::endl << + "Semester: " << s.get_semester() << std::endl; +} + static void cont(void) { std::cout << std::endl; diff --git a/assignment3.tar.gz b/assignment3.tar.gz Binary files differ.