I read a statement "Pointers to functions and pointers to members cannot be assigned to void *s" in the book "C++ Programing Language 3rd Edition", Section 5.6, Pointer to Void.
I believe I have tried to create a similar situation but it works.
Is my understanding wrong??? or VC++ 6.0 yet to implement this functionality???
The code that worked is given below.
//////////////////////////////////////////////////////////// the actual program /////////////////
///////////////////////// end of program
// function declarations
void test_void_pointers(void *);
// function definitions
std::cout << "I am working" << std::endl;
void test_void_pointers(void *vp)
// explicit type converstion
void (*fp)() = (void (*)()) vp;
// call display() using pointer to function
// passing the address of the function display.
// it is being received in a void *vp
void (*fp)() = display;