Ticket #3747: main.2.cpp
File main.2.cpp, 395 bytes (added by , 13 years ago) |
---|
Line | |
---|---|
1 | #include <stdio.h> |
2 | #include <tchar.h> |
3 | #include <crtdbg.h> |
4 | |
5 | #include "fstream" |
6 | |
7 | #include "SerializationDerived.hpp" |
8 | |
9 | int _tmain(int argc, _TCHAR* argv[]) |
10 | { |
11 | Main |
12 | mainObj; |
13 | |
14 | std::ofstream ofs("test.txt", std::ios_base::out); |
15 | |
16 | mainObj.m_pObj = new Object(); |
17 | |
18 | boost::archive::text_oarchive oa(ofs); |
19 | |
20 | // write class instance to archive |
21 | oa << mainObj; |
22 | return 0; |
23 | } |