From 2c9056a23e1a55fd21a8e314c903d9325bffd62e Mon Sep 17 00:00:00 2001 From: Carlos Maiolino Date: Sat, 6 Sep 2025 09:37:14 +0200 Subject: Move CPP code here Signed-off-by: Carlos Maiolino --- CPP/cpp_book/chap3/student_info.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 CPP/cpp_book/chap3/student_info.h (limited to 'CPP/cpp_book/chap3/student_info.h') diff --git a/CPP/cpp_book/chap3/student_info.h b/CPP/cpp_book/chap3/student_info.h new file mode 100644 index 0000000..697f3c0 --- /dev/null +++ b/CPP/cpp_book/chap3/student_info.h @@ -0,0 +1,20 @@ +#ifndef STUDENT_INFO_H +#define STUDENT_INFO_H + +#include +#include +#include + +struct StudentInfo { + std::string name; + double midterm; + double final; + std::vector homework; +}; + + +bool compare_students(const StudentInfo& a, const StudentInfo& b); +std::istream& read_homework(std::istream& in, std::vector& hw); +std::istream& read_student(std::istream& is, StudentInfo& s); + +#endif /* STUDENT_INFO_H */ -- cgit v1.2.3