< C++ Programming < Code < Standard C Library < Functions
memcmp
Syntax |
#include <cstring>
int memcmp( const void *buffer1, const void *buffer2, size_t count );
|
The function memcmp() compares the first count characters of buffer1 and buffer2. The return values are as follows:
Return value | Explanation |
---|---|
less than 0 | buffer1 is less than buffer2 |
equal to 0 | buffer1 is equal to buffer2 |
greater than 0 | buffer1 is greater than buffer2 |
This article is issued from
Wikibooks.
The text is licensed under Creative
Commons - Attribution - Sharealike.
Additional terms may apply for the media files.