Compares characters between two buffers.
int memcmp( LPCVOID lpMem1, LPCVOID lpMem2, size_t uSize )
Returns an integer < 0 if lpMem1 is less than lpMem2, returns 0 if lpMem1 is identical to lpMem2, and returns an integer > 0 if lpMem1 greater than lpMem2.
EX1
void memcmp_ex1() { char szFirst[] = "1234567890"; char szSecond[] = "1234567891"; size_t nNumerOfBytesToCompare = 9; // change this to 10 to see a different result int nResult = memcmp(szFirst, szSecond, nNumerOfBytesToCompare); if (0 == nResult) out_str("Equal"); else if (0 > nResult) out_str("First is less than second"); else out_str("First is greater than second"); }
strcmp
origin.h