基本上没什么错嘛
#include <windows.h>
#include <stdio.h>
#include <conio.h>
//#include <ctype.h>
int my_strcmp( const char* pszSrc, const char* pszDest )
{
char* pSrc = (char*)pszSrc;
char* pDest = (char*)pszDest;
int iResult = 0;
for ( ; *pSrc != 0 || *pDest != 0 ; pSrc++, pDest++ )
{
iResult = *pSrc - *pDest;
if ( iResult != 0 )
return iResult;
}
return 0;
}
int main()
{
char buffer[100];
L:
printf("请输入序列号:\n");
scanf( "%s", buffer );
if ( my_strcmp( buffer, "SN12345" ) == 0 )
printf("注册成功!\n");
else
printf( "注册失败!\n" );
getche();
goto L;
return 0;
}