/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:7:12: error: conflicting declaration 'std::__cxx11::string a'
     string a,b;
            ^
/in/foo.cc:6:10: note: previous declaration as 'char a [10000]'
     char a[10000], b[10000];
          ^
/in/foo.cc:7:14: error: conflicting declaration 'std::__cxx11::string b'
     string a,b;
              ^
/in/foo.cc:6:20: note: previous declaration as 'char b [10000]'
     char a[10000], b[10000];
                    ^
/in/foo.cc:11:20: error: request for member 'length' in 'a', which is of non-class type 'char [10000]'
         char c=a[a.length()-1];
                    ^~~~~~
/in/foo.cc:12:20: error: request for member 'length' in 'b', which is of non-class type 'char [10000]'
         char d=b[b.length()-1];
                    ^~~~~~

信息

递交者
类型
递交
题目
P1196 吃糖果游戏
语言
C++
递交时间
2020-03-29 21:49:50
评测时间
2020-03-29 21:49:50
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes