shetlandbob
Programmer
Hello again,
Has anyone come across general problems reading binary file data directly into structures, i.e.
fread ( &structure, sizeof(Structure), 1,inputResultsFile );
If I read each line individually
(using fread ( &int, sizeof(int),.... etc for multiple variables)
then it works, but as when I create a structure with all the correct variables and then try to read it then I get errors reading the values (its very inconsistent, it will read some of them ok, then it will read a corrupt value for no apparent reason??)
Any ideas/help/good luck messages appreciated!!!!
Cheers
Has anyone come across general problems reading binary file data directly into structures, i.e.
fread ( &structure, sizeof(Structure), 1,inputResultsFile );
If I read each line individually
(using fread ( &int, sizeof(int),.... etc for multiple variables)
then it works, but as when I create a structure with all the correct variables and then try to read it then I get errors reading the values (its very inconsistent, it will read some of them ok, then it will read a corrupt value for no apparent reason??)
Any ideas/help/good luck messages appreciated!!!!
Cheers