-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
38 lines (35 loc) · 1.1 KB
/
Copy pathmain.cpp
File metadata and controls
38 lines (35 loc) · 1.1 KB
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
/********************************************************
* *
* Project: PythonExercise *
* Author: Michał Walczak *
* Version: "1.1" *
* Last modified: 2016.10.20 *
* Status: initial draft *
* *
********************************************************/
#include <sstream>
#include <fstream>
#include <map>
#include <string>
#include <memory>
#include <vector>
#include "appPE.hpp"
int main(int argc, char* argv[])
{
if(argc != 2)
{
std::cerr << "Error. Wrong number of arguments!\n";
return 1;
}
else
{
std::string filename(argv[1]);
assesorClass assesorObj;
if(assesorObj.fileSizeCheck(filename) > assesorObj.maxFileSize)
{
std::cerr << "Error. Exceeded max file size" << std::endl;
return 1;
}
return assesorObj.readFileContent(filename);
}
}