Matt <[EMAIL PROTECTED]> writes:
What trick do I have to use to make the file contain exactly the data I send to fwrite?
Perhaps open the file in binary mode?
fopen("output", "wb"); ^ Cheers,
Much obliged guys. I guess I should have RTFM.
The mode string can also include the letter ‘‘b’’ either as a last character or as a character between the characters in any of the two-character strings described above. This is strictly for compatibility with ANSI X3.159-1989 (‘‘ANSI C’’) and has no effect; the ‘‘b’’ is ignored on all POSIX conforming systems, including Linux. (Other systems may treat text files and binary files differently, and adding the ‘‘b’’ may be a good idea if you do I/O to a binary file and expect that your program may be ported to non-Unix environments.)
_______________________________________________
Help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus
