晕。咋发了两遍一样的帖子
DO IT YOURSELF !
/*这里我摘录了函数的版权情况 *strcmp.c - routine to compare two strings (for equal, less, or greater) * * Copyright (c) Microsoft Corporation. All rights reserved. * *Purpose: * Compares two string, determining their lexical order. * */ /* 这里我只摘录了函数的返回值 Exit: * returns -1 if src < dst * returns 0 if src == dst * returns +1 if src > dst */ int __cdecl strcmp ( const char * src, const char * dst ) { int ret = 0 ; while( ! (ret = *(unsigned char *)src - *(unsigned char *)dst) && *dst) ++src, ++dst; if ( ret < 0 ) ret = -1 ; else if ( ret > 0 ) ret = 1 ; return( ret ); }