记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:10:21: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'int**' [-Wformat=]
   scanf("%d%d",&m,&n);
                ~~   ^
foo.cc:10:21: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'int**' [-Wformat=]
foo.cc:11:31: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   printf("%d\n",Distribute(m,n));
                               ^
foo.cc:3:5: note:   initializing argument 1 of 'int Distribute(int, int)'
 int Distribute(int m,int n);
     ^~~~~~~~~~
foo.cc:11:31: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   printf("%d\n",Distribute(m,n));
                               ^
foo.cc:3:5: note:   initializing argument 2 of 'int Distribute(int, int)'
 int Distribute(int m,int n);
     ^~~~~~~~~~
foo.cc:7:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&k);
  ~~~~~^~~~~~~~~
foo.cc:10:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d%d",&m,&n);
   ~~~~~^~~~~~~~~~~~~~

信息

递交者
类型
递交
题目
P1031 s-0-2班级活动之分苹果
语言
C++
递交时间
2020-12-01 10:59:15
评测时间
2020-12-01 10:59:15
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes