-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.cpp
71 lines (69 loc) · 1.55 KB
/
main.cpp
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#include "Tasks.h"
using namespace std;
int main(int argc, char* argv[]) {
// cout << "sup";
if(argc != 2) {
cout<<"Wrong imput format"<<endl;
cout<<"Usage : <executable> <input filename.ppm>"<<endl;
return 0;
}
string input;
cout<<"Our group task ID combination is: 1, 3 ,4 ,5, 6, 7"<<endl;
getline(cin, input);
vector<int> ip = getInput(input);
for(int i=0;i<ip.size();i++) {
switch(ip[i]) {
case 1:
try {
IMT2016012(argv[1]);
}
catch(int e) {
cout<<"An exception occured in task 1 " << e << endl;
}
break;
case 3:
try {
IMT2016066(argv[1]);
}
catch(int e) {
cout<<"An exception occured in task 3 " << e << endl;
}
break;
case 4:
try {
IMT2016126(argv[1]);
}
catch(int e) {
cout<<"An exception occured in task 4 " << e << endl;
}
break;
case 5:
try {
IMT2016107(argv[1]);
}
catch(int e) {
cout<<"An exception occured in task 5 " << e << endl;
}
break;
case 6:
try {
IMT2016040(argv[1]);
}
catch(int e) {
cout<<"An exception occured in task 6 " << e << endl;
}
break;
case 7:
try {
IMT2016087(argv[1]);
}
catch(int e) {
cout<<"An exception occured in task 7 " << e << endl;
}
break;
default:
cout<<"Not a valid input";
}
}
return 0;
}