This repository was archived by the owner on Nov 6, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,14 @@ int main(int argc, char** argv) {
51
51
if (done_c && done_sc && done_cpu) {
52
52
Runtime rt (sc, cpu, c);
53
53
rt.run ();
54
+ } else {
55
+ std::cerr << " USAGE: The program takes three files, with their specific flags prepending them. Example:\n\n "
56
+ << " schdulEd -cpu classes_per_uc.csv -c classes.csv -sc students_classes.csv\n\n "
57
+ << " Where '-cpu' is the flag that specifies a CSV file which contains the list of classes per each UC\n "
58
+ << " Where '-c' is the flag that specifies a CSV file which contains the list of classes an their schedules\n "
59
+ << " Where '-sc' is the flag that specifies a CSV file which contains the list of students and their association with each class\n "
60
+ << std::endl;
61
+ std::exit (1 );
54
62
}
55
63
56
64
return 0 ;
Original file line number Diff line number Diff line change @@ -166,10 +166,10 @@ void Runtime::run() {
166
166
167
167
void Runtime::process_args (std::vector<std::string> args) {
168
168
if (args[0 ] == " quit" ) {
169
- std::string answer;
169
+ char answer;
170
170
std::cout << " Do you wish to save any changes you have made? [y/N]" << std::endl;
171
171
std::cin >> std::noskipws >> answer;
172
- if (answer == " y " ) {
172
+ if (answer == ' y ' ) {
173
173
std::cout << " Saving..." << std::endl;
174
174
this ->save_all ();
175
175
this ->students_classes_ ->write_to_file ();
You can’t perform that action at this time.
0 commit comments