记录详情

Compile Error

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)提供评测服务

信息

递交者
类型
自测
题目
P1041 函数2(字符串1)
语言
C++
递交时间
2021-11-07 10:15:26
评测时间
2021-11-07 10:15:26
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes