Hi all,
I'm trying to read-in some binary data from a file, into a bitset. I was doing this:
but found my stack was getting corrupted when I was doing the read(). It seemed to work most of the time, but not all of the time.Code:bitset<FLAG_SIZE> flags; file.read((char *) &flags, FLAG_SIZE);
I've tried other syntax with no luck. Any ideas?? Can I read binary data from a file directly into a bitset? (STL newbie)
Thanks for any pointers.