Or do you have fixed numbers of each type of game object?
but no reason it couldn't be variable.
lets start with a character struct with just a name, x, and y. and we load and save a variable number of these. no problem, write the number of character structs, followed by the name, x, and y for each struct. very standard stuff, right? when you read, you read how many there are, then do a loop of that number of iterations reading in the values for each struct.
ok, now - add something else - how about z? it should work for this example.
so you leave the existing code alone, and add new code at the end:
// you've already written num_structs, so no need to do it twice. just write the (new) struct data.
for each struct, write z
so you're saving all the version 1 format data first (name, x and y), followed by all the version 2 data (z).
and load just reverses the process:
for i=0 i<num_structs i++
// you could be clever and realize you probably don't need to write num_structs twice, so for new format 2 data just do:
for i=0 i<num_structs