-
Notifications
You must be signed in to change notification settings - Fork 0
/
output.cpp
48 lines (31 loc) · 851 Bytes
/
output.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
#include <Windows.h>
#include <iostream>
#include <fstream>
#include <string>
std::ofstream ofs;
std::wofstream ofsW;
const char * outputFileName = "C:\\Users\\danish\\Desktop\\GTASADLL_msgs.txt";
std::ofstream getOutputLogStream()
{
std::ofstream ofs;
ofs.open ( outputFileName, std::ofstream::out | std::ofstream::app);
return ofs;
}
std::wofstream getOutputLogStreamW()
{
std::wofstream ofsW;
ofsW.open (outputFileName, std::wofstream::out | std::wofstream::app);
return ofsW;
}
void closeOutputStreams()
{
ofsW << "---------------------OUTPUT STREAMS CLOSING--------------------------------------- " << std::endl;
ofs.close();
ofsW.close();
}
void PrepareOutputStreams()
{
ofs = getOutputLogStream();
ofsW = getOutputLogStreamW();
ofsW << "Testing testing..... " << std::endl;
}