Assigning Method address to Pointer
Can anybody tell me the meaning of the line
void (*handle_it) (Event E) = AP_handler;
Here Event is another class defined and handle_it is a pointer variable that is being created.
Similarly even this line...
void (*handle_them) (Event E) = STA_handler;
The code is actually as follows:
void AP_handler(Event E)
{
//Some relevant code
}
void STA_handler(Event E)
{
// Some relevant code
}
int main()
{
Event x;
string input;
void (*handler_it) (Event E) = AP_handler;
void (*handle_them) (Event E) = STA_handler;
// the remaining part is some other relevant code.
}

