Reading and writing a vector of classes
问题 I have an inheritance hierarchy with three/four levels. And within each level will hold at least one or more classes with different attributes that make that object of a class unique (and of course, inheriting attributes from the level above). Each object of a class may have different attributes to another therefore my question is, how can I read and write each object to a file and differentiate the attributes? I do apologise if I have not worded this very well but will be very appreciative