foo.cc: In function 'void solve(char*, char*)':
foo.cc:7:28: warning: 'sizeof' on array function parameter 's' will return size of 'char*' [-Wsizeof-array-argument]
for (int i=0;i<sizeof(s);i++){
^
foo.cc:4:19: note: declared here
void solve(char s[],char ans[]){
^
foo.cc:7:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i=0;i<sizeof(s);i++){
~^~~~~~~~
foo.cc:22:1: error: a function-definition is not allowed here before '{' token
{
^
foo.cc:28:1: error: expected '}' at end of input
}
^
[Hydro](https://hydro.ac)提供评测服务