uni

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

commit fbfab906c3d4aca23f2cb8c0a513544e09ae645b
parent 5c87702a78a31d156c38ca3c6f2da7c129d1ff76
Author: Christos Margiolis <christos@margiolis.net>
Date:   Fri, 22 May 2020 19:22:58 +0300

makefile fixes

Diffstat:
Massignment-2.3-operoverloading/Makefile | 2+-
Massignment-2.3-operoverloading/bin/operoverloading | 0
Massignment-2.3-operoverloading/obj/main.o | 0
Massignment-2.3-operoverloading/obj/student.o | 0
Massignment-2.3-operoverloading/src/student.cpp | 20+++++---------------
Massignment-2.3-operoverloading/src/student.h | 4++--
Massignment-2.4-inheritance/Makefile | 2+-
Massignment-2.5-spreadsheets/Makefile | 2+-
8 files changed, 10 insertions(+), 20 deletions(-)

diff --git a/assignment-2.3-operoverloading/Makefile b/assignment-2.3-operoverloading/Makefile @@ -12,7 +12,7 @@ MOVE = mv MKDIR_P = mkdir -p CC = g++ -CPPFLAGS += -Iinclude +CPPFLAGS += -Iinclude -pedantic CFLAGS += -std=c++17 -Wall LDFLAGS += -Llib #LDLIBS += -lm diff --git a/assignment-2.3-operoverloading/bin/operoverloading b/assignment-2.3-operoverloading/bin/operoverloading Binary files differ. diff --git a/assignment-2.3-operoverloading/obj/main.o b/assignment-2.3-operoverloading/obj/main.o Binary files differ. diff --git a/assignment-2.3-operoverloading/obj/student.o b/assignment-2.3-operoverloading/obj/student.o Binary files differ. diff --git a/assignment-2.3-operoverloading/src/student.cpp b/assignment-2.3-operoverloading/src/student.cpp @@ -1,29 +1,19 @@ #include "student.h" Student::Student(const char *id, const std::string& name) - :id(convid(id)), name(name), semester(1), pcourses(0) -{ - nsc = 0; - sc = nullptr; -} + :id(convid(id)), name(name), semester(1), pcourses(0), + sc(nullptr), nsc(0) {} Student::Student(const char *id, const std::string& name, const unsigned int semester) - :id(convid(id)), name(name), semester(semester), pcourses(0) -{ - nsc = 0; - sc = nullptr; -} + :id(convid(id)), name(name), semester(semester), pcourses(0), + sc(nullptr), nsc(0) {} Student::Student(const char *id, const std::string& name, const unsigned int semester, const unsigned int pcourses, const float *grades) :id(convid(id)), name(name), semester(semester), pcourses(pcourses), - grades(convpsg(grades)) -{ - nsc = 0; - sc = nullptr; -} + grades(convpsg(grades)), sc(nullptr), nsc(0) {} Student::Student(const Student& s) :name(s.name), semester(s.semester), pcourses(s.pcourses) diff --git a/assignment-2.3-operoverloading/src/student.h b/assignment-2.3-operoverloading/src/student.h @@ -13,12 +13,12 @@ class Student private: char *id; // id std::string name; // Name - Course **sc; // Submitted courses - unsigned int nsc; // Number of submitted courses unsigned int semester; // Current semester unsigned int pcourses; // Passed courses float *grades; // Grades std::size_t size; + Course **sc; // Submitted courses + unsigned int nsc; // Number of submitted courses public: Student(const char *id, const std::string& name); diff --git a/assignment-2.4-inheritance/Makefile b/assignment-2.4-inheritance/Makefile @@ -12,7 +12,7 @@ MOVE = mv MKDIR_P = mkdir -p CC = g++ -CPPFLAGS += -Iinclude +CPPFLAGS += -Iinclude -pedantic CFLAGS += -std=c++17 -Wall LDFLAGS += -Llib #LDLIBS += -lm diff --git a/assignment-2.5-spreadsheets/Makefile b/assignment-2.5-spreadsheets/Makefile @@ -12,7 +12,7 @@ MOVE = mv MKDIR_P = mkdir -p CC = g++ -CPPFLAGS += -Iinclude +CPPFLAGS += -Iinclude -pedantic CFLAGS += -std=c++17 -Wall LDFLAGS += -Llib #LDLIBS += -lm