Hi,
I’m trying to write binary data to an ofstream object and I’m doing this :
long MyInt = 1234;
MyFile << MyInt << std::flush;
This works but the file contains the string "1234", not the binary representation of the long value. I've opened MyFile with ios::binary, but that doesn't seem to be the trick. How do I write to this file so it contains the actualy binary representation of a long variable?
Thanks in advance,
Doug Farrell