Mail Archives: djgpp/1999/04/20/08:23:37
On Mon, 19 Apr 1999, vern wrote:
> I can open
> the file successfully, but I cannot write to it. I am trying to write
> the following ot the file: an array of BITMAPS (if u havent used
> allegro, a bitmap is a typedef structure), and an array of structures.
[snip]
> save_file = fopen("demo.map", "w");
This last line is the problem: you need to open the file with "wb",
since this is binary data you are trying to write.
> Ive spent some time trying to figure this out myself, but no luck.
Too bad you didn't look in the FAQ first: this problem is explained
there in section 9.3.
- Raw text -