-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSource.cpp
More file actions
59 lines (47 loc) · 833 Bytes
/
Source.cpp
File metadata and controls
59 lines (47 loc) · 833 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
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
#include <iostream>
#include <Windows.h>
#include <string>
#include <conio.h>
#include "comparer.h"
using std::cout;
using std::endl;
using std::string;
#define br cout << endl
#define _EXEPT_START try {
#define _EXEPT_END } \
catch (std::exception &e) \
{ \
std::cout << "Error: " << e.what(); \
} \
catch (string &s) \
{\
std::cout << s; \
}\
catch (...) { \
std::cout << "×òî-òî ïîøëî íå òàê... Chrome.(c) "; \
}
int main(int argc, char*argv[])
{
_EXEPT_START
SetConsoleOutputCP(1251);
SetConsoleCP(1251);
if (argc == 1)
return 0;
else if (argc < 3)
return 0;
else if (argc > 3)
return 0;
comparer comp(argv[1], argv[2]);
if (!comp.load())
{
cout << comp.getError() << endl;
return 0;
}
if (!comp.compareToCMD())
{
cout << comp.getError() << endl;
return 0;
}
_EXEPT_END
return 0;
}