Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Commit 53b6c1c

Browse files
committed
Merge remote-tracking branch 'origin/verification_processes' into verification_processes
2 parents 5fc413a + 17357c0 commit 53b6c1c

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

main.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ int main(int argc, char** argv) {
5151
if (done_c && done_sc && done_cpu) {
5252
Runtime rt(sc, cpu, c);
5353
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);
5462
}
5563

5664
return 0;

src/Runtime.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,10 @@ void Runtime::run() {
166166

167167
void Runtime::process_args(std::vector<std::string> args) {
168168
if (args[0] == "quit") {
169-
std::string answer;
169+
char answer;
170170
std::cout << "Do you wish to save any changes you have made? [y/N]" << std::endl;
171171
std::cin >> std::noskipws >> answer;
172-
if (answer == "y") {
172+
if (answer == 'y') {
173173
std::cout << "Saving..." << std::endl;
174174
this->save_all();
175175
this->students_classes_->write_to_file();

0 commit comments

Comments
 (0)