-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwaitlist.cpp
More file actions
27 lines (22 loc) · 700 Bytes
/
Copy pathwaitlist.cpp
File metadata and controls
27 lines (22 loc) · 700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "pr_check.h"
#include "EnrollmentManager.h"
#include <iostream>
using namespace std;
int main(int argc, char* argv[]) {
if (argc != 5) {
cerr << "Usage: ./waitlist <semester> <prereqfile> <schedsfile> <enrollmentfile>" << std::endl;
return 1;
}
string semester = argv[1];
string prereq_file = argv[2];
string schedules_file = argv[3];
string enrollment_file = argv[4];
try {
EnrollmentManager manager(semester, prereq_file, schedules_file);
manager.process_enrollment_file(enrollment_file);
} catch (const runtime_error& e) {
std::cerr << "Error: " << e.what() << std::endl;
return 1;
}
return 0;
}