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);
~~~~~^~~~~~~~~~~~~~