The return type pos is a member typedef of class Screen, thus it needs the scope operator Screen::pos.