为什么本地运行没有任何问题,提交后编译失败?
查看原帖
为什么本地运行没有任何问题,提交后编译失败?
1101962
xiao12chen楼主2023/11/16 18:36

/tmp/compiler_ca3_c6lg/src: 在函数‘int main()’中: /tmp/compiler_ca3_c6lg/src:7:2: 错误:‘gets’ was not declared in this scope; did you mean ‘fgets’? 7 | gets(shu); | ^~~~ | fgets /tmp/compiler_ca3_c6lg/src:8:15: 警告:comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 8 | for(int i=0;i<strlen(shu);i++){ | ~^~~~~~~~~~~~ /tmp/compiler_ca3_c6lg/src:17:19: 警告:comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 17 | }for(int i=c+1;i<strlen(shu);i++){ | ~^~~~~~~~~~~~ /tmp/compiler_ca3_c6lg/src:28:17: 警告:comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 28 | }for(int i=c;i<strlen(shu);i++){ | ~^~~~~~~~~~~~

2023/11/16 18:36
加载中...