Thanks for the replies.Yeah I managed to solve the problem. As the real program was a bit long I posted a short skeleton of the program.My mistake was that i was doing something not required by trying to make the pointer point to a member function.I managed to fix this now.THANKS AGAIN.