No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hi I'm having a problem with this piece of inheritance code. When compiling it displays this error " 'getAverage' : is not a member of 'Person' " but shouldn't the casting overcome that problem? Do i really need to have a virtual function in "Person" for this to work? Thanks … |
|
Hi I'm trying to use a vector to store function pointers, but when implemented in a class there method ceases to work. Class header: [CODE]std::vector<void (*)()> fns[/CODE] Class .cpp file: [CODE] fns.push_back(Search); fns.push_back(Print);[/CODE] Search() and Print() are (public) members of a class named Movie. This code is currently placed in … |