记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:15:16: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]' (did you forget the '()' ?)
  for(i=0;i<str.length;i++)
            ~~~~^~~~~~
/in/foo.cc:19:9: error: 'ch' was not declared in this scope
   else  ch[a[i]]++;
         ^~
/in/foo.cc:22:14: error: 'ch' was not declared in this scope
  for(auto it:ch)
              ^~
/in/foo.cc:25:7: error: redeclaration of 'int x'
   int x=it.second;
       ^
/in/foo.cc:24:7: note: 'int x' previously declared here
   int x=it.first;
       ^

信息

递交者
类型
递交
题目
P1420 1-4 游游的数组染色
语言
C++
递交时间
2024-01-19 14:48:41
评测时间
2024-01-19 14:48:41
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes