- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
Latest commit
26 lines (19 loc) · 422 Bytes
/
Copy pathmain.cpp
File metadata and controls
26 lines (19 loc) · 422 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
/*
* Common main()
*/
#include<cassert>
#include<iostream>
#include"main.h"
usingnamespacestd;
intmain( int argc, char* argv[] ) {
assert( argc == 2 );
Part part;
if ( string( argv[1] ) == "-1" ) {
part = Part::PART1;
} elseif ( string( argv[1] ) == "-2" ) {
part = Part::PART2;
} else {
assert( ! "Bad part" );
}
returnmainfunc( cin, cout, part );
}