I have a 2d vector of objects that I need to write to a file and then read back from it later on. Can anyone please provide me information on how to go about it? Details of my 2d vector are as follows:
Overload the << and >> operators for your class, then iterate through the vector elements and print them to the file, reading would be something similar, you may want to store the vector sizes at the beginning of the file so you can know them when reading back