main()
{char a[20];
char *q,*p;
printf("input the string:");
gets(a);
p=a;
q=a+strlen(a)-1;
while(p!=q&&q-p!=1&&*p++==*q--);
if(p==q||q-p==1)printf("hui wen\n");
else printf("bu shi huiwen\n");
getch();
}
运行成功!!!!!向各位无私奉献自己知识的高手敬礼~~~~~
C:\Documents and Settings\zsl\桌面\0.cpp(9) : error C2065: 'strlen' : undeclared identifier
C:\Documents and Settings\zsl\桌面\0.cpp(13) : error C2065: 'getch' : undeclared identifier
C:\Documents and Settings\zsl\桌面\0.cpp(14) : warning C4508: 'main' : function should return a value; 'void' return type assumed
Error executing cl.exe.