文章
1
粉丝
234
获赞
1
访问
9.0k
#include<bits/stdc++.h>
using namespace std;
char s[105];
int main(){
while(gets(s)){
strrev(s);
puts(s);
}
return 0;
}
运行状态: Compilation Error
Main.cpp: In function ‘int main()’: Main.cpp:6:11: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations] while(gets(s)){ ^ In file included from /usr/include/c++/5/cstdio:42:0, from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46, from Main.cpp:1: /usr/include/stdio.h:638:14: note: declared here extern char *gets (char *__s) __wur __attribute_deprecated__; ^ Main.cpp:6:11: warning: ‘char* gets(char*)’ is depre
登录后发布评论
strrev可能被限制使用了