Compile Error

foo.cc:3:9: error: expected unqualified-id before 'int'
 int n,k,int cnt=0;
         ^~~
foo.cc: In function 'int main()':
foo.cc:12:4: error: 'cnt' was not declared in this scope
    cnt++;
    ^~~
foo.cc:12:4: note: suggested alternative: 'int'
    cnt++;
    ^~~
    int
foo.cc:18:17: error: 'cnt' was not declared in this scope
    cout<<"OK "<<cnt;
                 ^~~
foo.cc:18:17: note: suggested alternative: 'int'
    cout<<"OK "<<cnt;
                 ^~~
                 int
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1024 取数问题(takenumber)
语言
C++
递交时间
2021-07-27 11:23:16
评测时间
2021-07-27 11:23:16
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes