You are missing
;
after each class declaration.If you write
TitleScreen(std::string title) : MenuScreen(title)
you are defining the body of the method but the body is missing... so you should put just declaration to your TitleScreen.h :class TitleScreen : public MenuScreen { public: TitleScreen(std::string title); };
and then place the body of the constructor to TitleScreen.cpp:
#include "TitleScreen.h" TitleScreen::TitleScreen(std::string title) : MenuScreen(title) { // .. }
Edit: fixed the terminology accordint to this question.