memcmp()

函數原型:

int memcmp(const void *buf1, const void *buf2, unsigned int count);
/*
 *  比較buf1和buf2的前count的字節
*/

頭文件:#include<string.h>或#include<memory.h>函數

返回值:

當buf1<buf2時,返回值小於0code

當buf1==buf2時,返回值=0原型

當buf1>buf2時,返回值大於0string

相關文章
相關標籤/搜索