Say I have an array of ojects, one of the members in each object is a class called string that I have made myself, the one member in the string class is a pointer to char (char* str).
Now I want to write all elements in the array to file, and later read them from the file. I save in biary mode, but since the objects in the array contains objects whith pointers to dynamic memory, I cant use the sizeof operator(?) to know each objects size (where each object starts and stops) in memory, any suggestion on how to solve this?