-
Notifications
You must be signed in to change notification settings - Fork 0
/
conv-to-decimal.cpp
58 lines (54 loc) · 1.18 KB
/
conv-to-decimal.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
57
58
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstring>
#include <sstream>
#include "binary.h"
#include "data.h"
using namespace std;
union dtype
{
uint64_t u64;
uint8_t u8[8];
} type;
int main()
{
ofstream fout;
fout.open("frames.csv");
for (int i = 0; i < IMAGES_1_LEN; i++)
{
memcpy(&type.u8, IMAGES_1[i], 8);
fout << type.u64 << "\n";
}
for (int i = 0; i < IMAGES_2_LEN; i++)
{
memcpy(&type.u8, IMAGES_2[i], 8);
fout << type.u64 << "\n";
}
for (int i = 0; i < IMAGES_3_LEN; i++)
{
memcpy(&type.u8, IMAGES_3[i], 8);
fout << type.u64 << "\n";
}
for (int i = 0; i < IMAGES_4_LEN; i++)
{
memcpy(&type.u8, IMAGES_4[i], 8);
fout << type.u64 << "\n";
}
for (int i = 0; i < IMAGES_5_LEN; i++)
{
memcpy(&type.u8, IMAGES_5[i], 8);
fout << type.u64 << "\n";
}
for (int i = 0; i < IMAGES_6_LEN; i++)
{
memcpy(&type.u8, IMAGES_6[i], 8);
fout << type.u64 << "\n";
}
for (int i = 0; i < IMAGES_7_LEN; i++)
{
memcpy(&type.u8, IMAGES_7[i], 8);
fout << type.u64 << "\n";
}
return 0;
}