hello, i'm a beginner in C programming
i need some help about C.
when i compile it,the compiler said "error: conflicting types for 'mak'."Code:#include <stdio.h> #include <stdlib.h> int main() { float av,prc,i,j,k; scanf("%f %f %f", &i, &j, &k); mak(&i,&j,&k,&av,&prc); printf("\n%f %f",av,prc); return 0; } mak(float a, float b, float c, float *d, float *e) { *d=(a+b+c)/3; *e=*d; }
and when i change the data type of variables i,j,k,a,b,c from float to integer, the error message shows no more. how can be it happen? what should I do if i still want the type of variables i,j,k,a,b,c is float?



LinkBack URL
About LinkBacks



I used to be an adventurer like you... then I took an arrow to the knee.