Hi all,
I need to search a text file for hexadecimal code from another text file...
This is the situation ...
I have two text files...
search.txt and code.txt...
Search.txt contains code to be searched for...
3A
4D
...etc
and code.txt
looks like this...
5A
6A
...etc
I need to check if all the hex code in search.txt matches with
the hex code in code.txt...
Please help:(
Thankyou everyone in advance!!! :)
Regards,
Aravind.
Okay,
both are text files ...
I need to search code.txt for hexadecimal digits in search.txt...
Please help:)
Thankyou everyone in advance!!! :)
Regards,
Aravind.
As I've said, you could just compare the files byte by byte. The easiest way is to open the first file, swallow it all inside a buffer, do the same with the second file, and then memcmp() them. Though it obviously won't work if you want to compare big files (larger than your available RAM).