uni

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

commit d89c3f0105c81c6cbbe64efda69910c71296de54
parent e7298c52920b85e856ec53760fd4df9ab35bf6be
Author: Christos Margiolis <christos@margiolis.net>
Date:   Wed, 13 May 2020 15:05:07 +0300

pending data store and analyze

Diffstat:
Massignment-2.5-spreadsheets/bin/spreadsheets | 0
Massignment-2.5-spreadsheets/obj/app.o | 0
Massignment-2.5-spreadsheets/obj/main.o | 0
Massignment-2.5-spreadsheets/obj/xstring.o | 0
Massignment-2.5-spreadsheets/src/app.cpp | 14+++++++-------
Massignment-2.5-spreadsheets/src/xstring.cpp | 16++++++++--------
6 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/assignment-2.5-spreadsheets/bin/spreadsheets b/assignment-2.5-spreadsheets/bin/spreadsheets Binary files differ. diff --git a/assignment-2.5-spreadsheets/obj/app.o b/assignment-2.5-spreadsheets/obj/app.o Binary files differ. diff --git a/assignment-2.5-spreadsheets/obj/main.o b/assignment-2.5-spreadsheets/obj/main.o Binary files differ. diff --git a/assignment-2.5-spreadsheets/obj/xstring.o b/assignment-2.5-spreadsheets/obj/xstring.o Binary files differ. diff --git a/assignment-2.5-spreadsheets/src/app.cpp b/assignment-2.5-spreadsheets/src/app.cpp @@ -12,13 +12,6 @@ App::~App() void App::store_data() { - for (auto& stud : studs) - std::cout << stud.first << std::endl; -} - -void -App::analyze() -{ std::ifstream f; const char *fpath = "res/grades.csv"; f.exceptions(std::ifstream::badbit); @@ -37,6 +30,7 @@ App::analyze() lab::getline(f, AM, ';'); lab::getline(f, code, ';'); lab::getline(f, grade); + if (f.eof()) break; } } f.close(); @@ -47,6 +41,12 @@ App::analyze() } } +void +App::analyze() +{ + +} + bool App::valid_path(const char *fpath) { diff --git a/assignment-2.5-spreadsheets/src/xstring.cpp b/assignment-2.5-spreadsheets/src/xstring.cpp @@ -109,49 +109,49 @@ xstring::operator!= (const char *s) const bool xstring::operator< (const xstring& s) const { - return strlen(this->str) < strlen(s.str); + return strcmp(str, s.str) < 0; } bool xstring::operator< (const char *s) const { - return strlen(this->str) < strlen(s); + return strcmp(str, s) < 0; } bool xstring::operator<= (const xstring& s) const { - return strlen(this->str) <= strlen(s.str); + return strcmp(str, s.str) <= 0; } bool xstring::operator<= (const char *s) const { - return strlen(this->str) <= strlen(s); + return strcmp(str, s) <= 0; } bool xstring::operator> (const xstring& s) const { - return strlen(this->str) > strlen(s.str); + return strcmp(str, s.str) > 0; } bool xstring::operator> (const char *s) const { - return strlen(this->str) > strlen(s); + return strcmp(str, s) > 0; } bool xstring::operator>= (const xstring& s) const { - return strlen(this->str) >= strlen(s.str); + return strcmp(str, s.str) >= 0; } bool xstring::operator>= (const char *s) const { - return strlen(this->str) >= strlen(s); + return strcmp(str, s) >= 0; } char&