summaryrefslogtreecommitdiff
path: root/src/test/serialize.cpp
blob: 883be5e6bd109bd16b73f8c8b7f3fb07612cac2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "serializerbinary.h"
#include <stdio.h>

int main()
{
	int32_t one;
	double two;
	bool three;
	SerializerBinary ar("hello.dat", false);
	ar << (int)85;
	ar << (double)2.63434;
	ar << false;
	ar.close();

	one = 0; two = 0; three = true;
	
	SerializerBinary ar2("hello.dat", true);
	ar2 >> one;
	ar2 >> two;
	ar2 >> three;

	printf("we got %d - %f - %s\n", one, two, (three ? "true":"false"));
	return 0;
}