|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: binary files in C++
i think the prob is that buffer is an annonymous object, try declaring it
outside of the fread..also what are "size" and "file_length" it is kinda
easy to screw those up too since they should be "size" and "item_count"
for example 2 items of size 10 write 20 bytes....and so forth
----- Original Message -----
From: "Matthew J Burke" <mburke6@osf1.gmu.edu>
To: <gameprogrammer@gameprogrammer.com>
Sent: Wednesday, May 24, 2000 11:56 AM
Subject: binary files in C++
> Help! I'm trying to modify a binary file, and I've degraded to simply
> trying to copy it using fwrite in string.h. It run and spits out a
> slightly different binary file. Can anybody find anything worng with this
> rough-up of my prog?
>
> int main{
> filepointer infile(infilename, rb), outfile(outfilename, wb)
> fread( char *buffer, size, file_length, infile)
> fwrite(buffer, size, file_lenght, outfile)
>
> thanks in advance,
> Matt
>
>
> =================================================================
> The GameProgrammer.Com mailing list is for the open discussion
> of any topic related to the art, science, and business of
> programming games. This list is especially tolerant of beginners.
> We were all beginners once
>
> To SUBSCRIBE or UNSUBSCRIBE please visit:
> http://gameprogrammer.com/mailinglist.html
=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once
To SUBSCRIBE or UNSUBSCRIBE please visit:
http://gameprogrammer.com/mailinglist.html
|
|