diff --git a/src/project.cpp b/src/project.cpp index f6f2281..25545ad 100644 --- a/src/project.cpp +++ b/src/project.cpp @@ -94,6 +94,9 @@ void ProjectList::save(std::string file_name){ if (!of){ std::cout << "Could not open file " << file_name << " for writing!" << std::endl; } + size_t month_len = month.length(); + of.write((char*) &month_len, sizeof(size_t)); + of.write((char*) month.c_str(), month_len); of.write((char*) &num_projects, sizeof(int)); of.write((char*) &active_project_id, sizeof(int)); for (int i=0; i 0){ std::cout << "Report for " << user_name << ", month: " << date_str << std::endl << std::endl; for (int i=0; imonth; std::string command = "mkdir -p "+tracking_dir; system (command.c_str()); proj_list->save(file_name);