Posts

Showing posts with the label serialization

Serializing data in MFC / Visual C++

Image
This post shows you how to utilize the built-in file handling capabilities that MFC has in order to serialize your data, that is, how to read from or write to a disk. Using the MFC document object One way is to use the MFC document object to do the serializing for you. This will be demonstrated by creating a simple SDI (single document interface) using the AppWizard. Select File > New > Project and select the Visual C++ > MFC Application as the choice of installed template:

Practical examples of using Boost serialization

Image
Listing1: Serialization of STL containers: a std::vector example using text archives Your intuition may tell you to iterate through the STL container in order to serialize it, but it's actually a lot simpler. First of all, be sure to include the necessary vector.hpp include file: