I'm just writing a reading for the time a binary file where I stored records of my objects.
It seems woorks very well.
Now I'm working for random access at position "X":
ifstream myFile(fileName,ios::in); myFile.seekg( (X*sizeof( object )) , ios::beg);
Should be ok.
Before I start to write code, I'm thinking my records contain dynamic array with diferrent sizes.
my record is an object to handle a tennis' game.
I've an array contains players' reference; This array can have a size of 2 or 4.
For access file rightly, can i mantein a dynamic array ot it's better to write an array fixed at 4 length ??
Excuse my bad english.
My english is only a little better than my c++ programming skill!!