HUST Online Judge WebBoard
Problem 3992 >> 3992编译错误
201803010205 @ 2019-05-13 11:11:39
[ Quote ] [ Edit ] [ Delete ] 1#
#include<stdio.h>
#include<string>
int main()
{
int StrCmp(char *s1, char * s2);
char s1[50];
char s2[50];
gets(s1);
gets(s2);
for(int i=0;i<50;i++){
if(s1[i]>s2[i]){
printf("%d\n",s1[i]-s2[i]);
break;
}
if(s1[i]<s2[i]){
printf("%d\n",s1[i]-s2[i]);
break;
}
if(s1[i]==s2[i]){
continue;

}
}
return 0;
}
201703120121 @ 2019-05-13 21:06:56
[ Quote ] [ Edit ] [ Delete ] 2#
#include<string>是C++的一个头文件。和#include<string.h>是两个不同的东西。

201803010205 @ 2019-05-13 21:28:01
[ Quote ] [ Edit ] [ Delete ] 3#
改了,提交正确