Hey so i just learned about the i/o part of the STL, more specifically fstream. Although I can now save binary info and classes i've made to the hard drive, i am not sure how to define how the info should be read.
I saw the answer for making a file format from [this][1] post:
Typically you would define a lot of records/structures, such as BITMAPINFOHEADER, and specify in what order they should come, how they should be nestled, and you might need to write a lot of indicies and look-up tables. Such files consists of a number of records (maybe nestled), look-up tables, magic words (indicating structure begin, structures end, etc.) and strings in a custom-defined format.
What i want to know specifcally is how to do this with the STL and C++... Since the format is meant simply for the use of a game i would think it would be much easier though. The format should:
- Be traversable (i can look through it and find the start of structure and maybe check it's name
- Be able to hold multiple classes and data in a single file
- have identifiable starts and ends to sections: such as the space in text files
- Maybe have it's own icon to represent it??
How do i do this in c++ ?