c150-ec@danube.Berkeley.EDU (Johnson Sieu) (10/01/90)
I wanted to define a function that accepts a function pointer in C++ and the compiler complained. My program is as follows: void foo () { } void foobar(void (*func)()) { void (*temp_func)(); temp_func = func; } int main() { foobar(&foo); } The compiler doesn't seem to accept my argument declaration for func! I compiled it under Lattice C and everything is fine. What is the problem then? Could any experienced C++ programmer please help me to see the light. Johnson email: c150-ec@danube.berkeley.edu