Hi!
I save/load my game data as binary files using fwrite() and fread(). I save large blocks of data by using: "fwrite(&item->startSave,1,&item->endSave-&item->startSave,f);" on my classes. This might be primitive but it has worked very well for me for many years.
However:
I now realise (with a new version of the IDE and some other upgrades) there seem to be something not working well when loading data (the binary file) in release mode (the data was saved in debug mode and loads well from there). At first it loads fine some classes but some data later on in the load function seems to be corrupt.
Is the size of the variables (arrays of ints and so on) changing between debug and release and can this be the problem? Some memory padding or something? Im using visual studio 2017 (c++) if that matters.
Thank you!