I'm trying to use a vector to store function pointers, but when implemented in a class there method ceases to work.
std::vector<void (*)()> fns
Class .cpp file:
Search() and Print() are (public) members of a class named Movie. This code is currently placed in the constructer. But wont compile.
The error is:
error C3867: 'Movie:: Search': function call missing argument list; use '&Movie:: Search' to create a pointer to member
I tried to do that, but then I get a mismatch compile error.
Also, should I create a new thread with a question of a way to have different kind of function pointers (different return types and arguments) in a single vector?