There are several issues:
- Missing semicolons after class definitions.
- Missing type for
doSomething method declaration/definition.
- Missing type for definition of
addStuff method.
After fixing that it seems to work.
Edit: As you have fixed the syntax errors and it still does not work. As others have suggested your compiler may require you to call the addStuff method with this-> prefix:
this->addStuff(thingy);