I've never seen a function declared like this, specifically the (*visit)(int&)
|
void inorder(void (*visit)(int &));
|
what is this called? how does it work?
The way I am looking at it I see: dereference visit, multiply it by an int.... but it makes no sense to me in the context it's used.
Last edited on
void (*visit)(int &) looks like a function pointer to me. One of the obscure abilities of C/C++.
Could you post the function? You only have the prototype there.
ah ok. thanks guys. I've never used a function pointer before. Now I know what it is :)