what exactly does this line of code do;
dataIn.write((char*) (&person),sizeof (person));
I got a code form PSC, and I need to understand exactly what this line of code is doing to be able to work it into my program.
Thing is I hardly know anything about c++ at the moment,and I have been kind of thrown off the deep end with a program am creating, anyway...
This code, I got from PSC, the details written to the file is name, address and telephone number, all are char data types.
I need to incorporate an account number (int datatype) for the program i am working on, but don't know how to make the above line of code write the account number in the file as well.
I am generating the account number in code and placing this in a variable. so How would I make the contents of the account number variable write to the file.