记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:7:46: error: expected initializer before 'maxscore'
     int card[200], box[400], cardnum, boxnum maxscore = 0, score = 0, count = 0, temp;
                                              ^~~~~~~~
/in/foo.cc:9:12: error: 'boxnum' was not declared in this scope
     cin >> boxnum >> cardnum;
            ^~~~~~
/in/foo.cc:21:17: error: overloaded function with no contextual type information
         count = 0;
                 ^
/in/foo.cc:22:9: error: 'score' was not declared in this scope
         score = box[0];
         ^~~~~
/in/foo.cc:25:29: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator+'
             count = card[i] + count;
                     ~~~~~~~~^~~~~~~
/in/foo.cc:26:30: error: invalid types 'int [400][<unresolved overloaded function type>]' for array subscript
             score = box[count] + score;
                              ^
/in/foo.cc:28:13: error: 'maxscore' was not declared in this scope
         if (maxscore < score)
             ^~~~~~~~
/in/foo.cc:32:13: error: 'maxscore' was not declared in this scope
     cout << maxscore << endl;
             ^~~~~~~~

信息

递交者
类型
递交
题目
P1076 乌龟棋
语言
C++
递交时间
2021-01-23 10:16:12
评测时间
2021-01-23 10:16:12
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes