开发者

Functions for comparing 2 bytearrays

I have two byte arrays of same length. Now i want to check if any value of the first array is different from any value of the second array. Is there any ready made functions that i can use rather than checki开发者_开发百科ng item by item of the arrays. I am using VC 6.0


http://www.cplusplus.com/reference/clibrary/cstring/memcmp/


I'd say you have the choice between :

  • The C-inherited memcmp from <cstring>
  • The C++ standard library std::equal from <algorithm>

I don't know how good/bad is VC6.0 support of standard library, so memcmp is probably the safest here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜