#include<stdio.h>
int main(void){
int n,m,a[1000]; /*用a【】存放结果*/
int check(int *p);
for(n=0;n<1000;n++){
a[n]=0;
} /*给a[]赋值*/
for(n=1,a[0]=1;n<=40;n++){
for(m=0;m<1000;m++){
a[m]*=n;
} /*循环,依次相乘*/
for(m=0;m<1000;m++){
check(a[m]); /*逢十进一*/
}
}
for(m=999;m>=0;m--){
printf("%d",a[m]);
}
return 0;
}
int check(int *p){
int jin;
if(*p>=10){
jin=*p%10;
*p-=jin*10;
*(p+1)+=jin;
check(*(p+1));
}
return 0;
}
vc++编译 有四个警告
F:\c\jicheng2.c(14) : warning C4047: 'function' : 'int *' differs in levels of indirection from 'int '
F:\c\jicheng2.c(14) : warning C4024: 'check' : different types for formal and actual parameter 1
F:\c\jicheng2.c(28) : warning C4047: 'function' : 'int *' differs in levels of indirection from 'int '
F:\c\jicheng2.c(28) : warning C4024: 'check' : different types for formal and actual parameter 1
怎么解决?