CJ <ca********@hotmail.com> wrote:
: I've got following:
:> file_a content needs to be compared with file_b content.
: I want to write content in binary form, then run a line by line
: comparison on characters. When the first different character has been
: found, a modification printf message will print to screen.
Part of what it means to be a "binary file" is that there are no
"lines", i.e. there is no character which is interpreted as an end
of line character. So you can't do a "line by line comparison".
You can, however, do a byte by byte comparison. Look at your compiler's
documentation for fgetc() and getc() to read bytes from a file.
Good Luck,
Paul
--
Paul D. Boyle
bo***@laue.chem.ncsu.edu
North Carolina State University
http://www.xray.ncsu.edu