Is it possible to store a whole class with all his variables and stuff in A file, so I can get it later back(would be handy if I can also a number to it), it is for making a datbase program..
Is it possible to store a whole class with all his variables and stuff in A file, so I can get it later back(would be handy if I can also a number to it), it is for making a datbase program..
Yes, what you have to do is write the object to the file in binary, then read the object from the file in binary.
Be careful though, if your class has pointers as fields, then when you read in the object from the file, those pointers will most probably be pointing to memory that you don't want it to be pointing at.