foo.cc: In function 'int main()':
foo.cc:11:17: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
11 | gets(text[i]); //这是啥情况。
| ^
In file included from /usr/include/stdio.h:867,
from /usr/include/c++/9/cstdio:42,
from /usr/include/c++/9/ext/string_conversions.h:43,
from /usr/include/c++/9/bits/basic_string.h:6496,
from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
235 | gets (char *__str)
| ^~~~
foo.cc:11:17: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
11 | gets(text[i]); //这是啥情况。
| ^
In file included from /usr/include/stdio.h:867,
from /usr/include/c++/9/cstdio:42,
from /usr/include/c++/9/ext/string_conversions.h:43,
from /usr/include/c++/9/bits/basic_string.h:6496,
from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
235 | gets (char *__str)
| ^~~~
foo.cc:26:25: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
26 | else if(text[i][j]=' ')
| ~~~~~~~~~~^~~~
foo.cc:36:19: error: expected ';' before 'cout'
36 | cout<<upper<<endl
| ^
| ;
37 | cout<<lower<<endl
| ~~~~
foo.cc:11:9: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result]
11 | gets(text[i]); //这是啥情况。
| ~~~~^~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务