i have some structures that i want to save to file and later to load them from that file to compare them with other etc...
i need to have one file and many structures in it
so what is the best way to do this
let say that i need to save 10 MSG and 10 WNDCLASS structures (just an example) in file, now how should i know where one structure starts, where other ends, what structure is next, what data is what in structure etc...
i didnt have many expirience with this kind of saving/retriving data
10x
i need to have one file and many structures in it
so what is the best way to do this
let say that i need to save 10 MSG and 10 WNDCLASS structures (just an example) in file, now how should i know where one structure starts, where other ends, what structure is next, what data is what in structure etc...
i didnt have many expirience with this kind of saving/retriving data
10x
You could create a file header wich your program reads so it knows what to expect. In your example something like
fHeader STRUCT
dwNumberOfWNDCLASS
dwNumberOfMSG
fHeader ENDS
fHeader STRUCT
dwNumberOfWNDCLASS
dwNumberOfMSG
fHeader ENDS