概述
首先看一下MSDN中对它的定义,函数参数,返回值
strcmp
(定义)Compare strings.
(函数参数)int strcmp( const char *string1, const char *string2 );
(返回值)The return value for each of these functions indicates the lexicographic relation of string1 to string2.
接下来,我们看一下代码实现
#include<stdio.h>
#include<windows.h>
int my_strcamp(const char* p,const char* q)
{
assert(p && q);
int ret = 0;
while (*p == *q)
{
if (*p == '