+ 1
Pointers to Functions
int function(int (*take)(int a)); int function2(int *take(int a)); What is the difference between those pointers? And how can I implement those pointers with functions?
4 Answers
+ 1
First of all, you should make this program global. Because it is a really good example. Also, what does the func2 return? Is it returning address of a pointer?And why are you casting something as int *?It doesn't make sense for me. Because they are passing to the function take with their own address. And we has a pointer in function parameter. The pointer should take the address of what we passed.
+ 1
Thank you for everything. I guess we just need to cast for functions. There is no need to cast for others. @kurwius