Does C++ or Boost has a function that compares two blocks of memory just like the C’s memcmp?
I tried Google but I only got the “memcmp” function.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use
memcmpin C++ as well. It is native in C++ too.All that you need to do is, include
<cstring>and then use fully-qualified namestd::memcmpinstead ofmemcmp. It is because it is instdnamespace, like every other standard library functions and classes.