-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.cpp
56 lines (42 loc) · 961 Bytes
/
test.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
#include <stdio.h>
#include <iostream>
#include <sstream>
#include "ReadFile.h"
#include "WriteToFile.h"
int main(int argc, char** argv)
{
ReadFile *thisFile = new ReadFile(argv[1]);
if (!thisFile -> isOpen())
{
std::cout << "Greska pri otvaranju falja!" << std::endl;
return -1;
}
//thisFile -> test();
bool stop = false;
stop = thisFile -> firstPass();
if (stop)
{
thisFile -> close();
return 0;
}
stop = thisFile -> secondPass();
if (stop)
{
thisFile -> close();
return 0;
}
thisFile -> close();
//thisFile -> test();
WriteToFile *output = new WriteToFile(argv[2], thisFile -> getSectionArray(), thisFile -> getSectionNum(),
thisFile -> getSymbol(), thisFile -> getRel(), thisFile -> getAfterEndSymbolIndex());
output -> write();
output -> close();
/*delete thisFile;
delete output;*/
/*std::string inString = "";
std::cout << std::endl;
myFile.close();
delete tempChar;
delete toAdd;*/
return 1;
}