From de1aa6d66e11232edf2d7bbc729425003f6c3db5 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 13 May 2006 00:08:20 +0000 Subject: david - initial commit of serialize code ;p --- src/test/serialize.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/test/serialize.cpp (limited to 'src/test') diff --git a/src/test/serialize.cpp b/src/test/serialize.cpp new file mode 100644 index 0000000..883be5e --- /dev/null +++ b/src/test/serialize.cpp @@ -0,0 +1,24 @@ +#include "serializerbinary.h" +#include + +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; +} -- cgit v1.2.3