Are you sure the definition is actually defining function onChar in class Game and not in class Screen? If you accidentally wrote this as the definition for onChar (which I can imagine could easily happen):
void Screen::KeyListener::onChar(char c) {}
then you are defining function in class Screen.
solved is there an equivalent to ‘classname.this’ from java in c++?