KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've reduced my problem down to the following example code: class pokemon{ public: pokemon(int n); }; class MewTwo : public pokemon { public: MewTwo(int n); }; MewTwo::MewTwo(int n) {} Which produces an error: no matching function for call to ‘pokemon::pokemon()’ What I think is happening is that a default constructor for pokemon is called when I try to write the MewTwo constructor, which doesn't exist. I'm relatively new to C++ so I'm just guessing here. Any ideas? Restraint: Fixes cannot modify or add public members to the classes.
Tags (comma-separated)
Save Edits
Cancel