记录详情

Compile Error

foo.cc: In function 'int factor(int, int*, int*)':
foo.cc:9:5: error: invalid conversion from 'int' to 'int*' [-fpermissive]
 fac=1; *n=1;
     ^
foo.cc:12:1: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
 while(i<=K);
 ^~~~~
foo.cc:13:1: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
 {
 ^
foo.cc: In function 'int main()':
foo.cc:41:18: error: expected primary-expression before ']' token
 sum=factor(m,fac[], num);
                  ^
foo.cc:44:23: warning: too many arguments for format [-Wformat-extra-args]
 printf("Factors:", num);
                       ^
foo.cc:40:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
 scanf("%d", &m);
 ~~~~~^~~~~~~~~~
正在同步测试数据,请稍后
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。

信息

递交者
类型
递交
题目
7-1 改错题
语言
C++
递交时间
2021-03-30 19:18:07
评测时间
2021-03-30 19:18:07
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes