|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: binary files in C++
I don't see anything wrong with your program but I remember writing a
program that delt with binary information and there was a character that it
would hit that would move the pointer back (four characters or four bits?? I
don't remember) and then read on correctly. Unfortunatly I don't remember
what I did to fix it. I would suggest trying to read and write using a
different type, possibly a byte type or a full Unsigned Word or Unsigned
Short (if you're scanning for a certain value you should still be able to do
that easily with a byte.
Jeff
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
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
=================================================================
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
|
|