记录详情

Compile Error

foo.cc: In function 'int factor(int, int*, int*)':
foo.cc:9:5: error: invalid conversion from 'int' to 'int*' [-fpermissive]
    9 | fac=1; *n=1;
      |     ^
      |     |
      |     int
foo.cc:12:1: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
   12 | while(i<=K);
      | ^~~~~
foo.cc:13:1: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
   13 | {
      | ^
foo.cc: In function 'int main()':
foo.cc:41:18: error: expected primary-expression before ']' token
   41 | sum=factor(m,fac[], num);
      |                  ^
foo.cc:44:8: warning: too many arguments for format [-Wformat-extra-args]
   44 | printf("Factors:", num);
      |        ^~~~~~~~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
7-1 改错题
语言
C++
递交时间
2022-10-07 11:26:47
评测时间
2022-10-07 11:26:47
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes