For various reasons I would like to be able to serialize some C++ classes that contain various arrays and other objects. In fact what I'm trying to do is to save state, contained in some nested classes and restart my program so that I can do some debugging.
My question is, is there an automated technique or perhaps some cut and paste boilerplate code or templates for achieving serialization and deserialization in C++? Do I have to write my own for every class?
Some languages provide some automation for this task.