I have several objects which I would like to serialize binary in one file. For the single one object I know how to do this and I can read it correctly back also.
But this means I need for each variable another new file and I would like to store all these different objects in the same binary file. I don't know if this is possible. I use a file stream where the object is serialized to. How would a code look like which can binary serialize multiple objects of different kind in the one file?
If this doesn't work, then I would like to know how to store for example this data in binary way in one file and read it correctly back afterwards: three strings, one double, one float, two longs and three string arrays (one with 5, another with 3 and one with 10 string elements).