Original Post
Say I have a class:
class a
{public:
int m_int;
float m_float;
}
And during my program I save the file:
a myAObject;
ofstream outfile("filename.ext", ios::binary);
outfile.write(reinterpret_cast(& (myAObject)), sizeof(a ));
But what if later I change my code to be:
class a
{public:
float m_float;
int m_int;
}
Now the float is first. If I tried to load that object that was saved before, would it load weird because it thinks the float is saved first, then the int?
--Vic--