It is very possible to assign a pointer to a function.
For the longest time I didn't believe this was possible and if it was, I thought it was a hack. But it's very legal and very common and legit practice!
http://www.newty.de/fpt/index.html
Though I understand them, I'd very well rather want you to read a mature and somewhat professionally authorized article.
bool(*fn_pt)(int,int) This declares that fn_pt is a pointer to a function that takes two integer type parameters and returns a bool type.
bool(*fn_pt)(int,int) = fncomp; We declare the function pointer and initialise it
with the adress of the fncomp function. (In C/C++, the name of a function is the address of the function.)
To call a function through a function pointer we can do it two ways:
1 2 3
bool result;
result = (*fn_pt)(1,2);
OR
1 2
bool result;
result = fn_pt(1,2);
EDit:
please also note that you can also say: bool(*fn_pt)(int,int) = &fncomp; when assigning the address of a function to a function pointer