K
key9
Hi all
My question is why the code CAN pass the compiler , and all the resoult is
right?
I means in my mind the reffoo(3,*test); should not pass compiler.
#include <stdio.h>
int test(int a)
{
printf("%d\n", a);
}
int reffoo(int val,int (*fp)(int))
{
fp(val);
}
int main()
{
reffoo(3,*test);
reffoo(4,&test);
reffoo(5,test);
return 0;
}
thank you very much!
your key9
My question is why the code CAN pass the compiler , and all the resoult is
right?
I means in my mind the reffoo(3,*test); should not pass compiler.
#include <stdio.h>
int test(int a)
{
printf("%d\n", a);
}
int reffoo(int val,int (*fp)(int))
{
fp(val);
}
int main()
{
reffoo(3,*test);
reffoo(4,&test);
reffoo(5,test);
return 0;
}
thank you very much!
your key9