Hi all, I want to ask about pointer in C++
I have some simple code:
int add(int a, int b){
return a+b;
}
int runner(int x,int y, int (*functocall)(int, int)){
return (*functocall)(x,y);
}
now, suppose I call those functions using this way :
cout<<runner(2,5,&add);
or maybe
cout<<runner(2,5,add);
is there any difference? because when I tried, the result is the same and with no error.
Thanks a lot