ProAnswers.org

How do I initialize a pointer to a function?

2 Likes

This is the way to initialize a pointer to a function

void fun(int a)
{

}

void main()
{
void (*fp)(int);
fp=fun;
fp(1);

}