记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:6:17: error: conflicting declaration 'int a'
    6 |  int a[N+1],j=N,a=1,b=0;
      |                 ^
foo.cc:6:6: note: previous declaration as 'int a [(N + 1)]'
    6 |  int a[N+1],j=N,a=1,b=0;
      |      ^
foo.cc:7:20: error: 'k' was not declared in this scope
    7 |  scanf("%d %d",&N,&k);
      |                    ^
foo.cc:13:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |   while(a<K)
      |           ^
foo.cc:16:5: error: lvalue required as increment operand
   16 |    a++;
      |     ^~
foo.cc:21:5: error: incompatible types in assignment of 'int' to 'int [(N + 1)]'
   21 |   a=1;
      |     ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1053 OO11-5 list中Joseph问题
比赛
2022春 面向对象程序设计方法的上机作业
语言
C++
递交时间
2022-05-13 17:15:03
评测时间
2022-05-13 17:15:03
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes