I have a small question.
I'm writing a loading/saving function for getting plain geometry data from a saved file. The objects involved are instanced from classes with a lot of data in them, but they all use just plain old data, and no pointers/allocated memory and the like.
Is it possible to load the file into an allocated char* array, typecast that to, say, Geometry* , and safely expect everything to not get scrambled assuming I did the same reversed thing when saving (typecasting the array to char* and writing it to file)?
If I attempt to access the array when it is pointed to by a char* pointer, or a int*, or any other pointer type, is there any special considerations I need to take?