Compare two files

前端 未结 6 1640
一向
一向 2020-12-14 03:57

I\'m trying to write a function which compares the content of two files.

I want it to return 1 if files are the same, and 0 if different.

ch1 an

6条回答
  •  一向
    一向 (楼主)
    2020-12-14 04:33

    When the files are binary, use memcmp not strcmp as \0 might appear as data.

提交回复
热议问题