ive been stuck for 2 days and i cant figure it out
~
NORMAL GameScreen.cpp unix │ utf-8 │ cpp 70% LN 19:20
"GameScreen.cpp" 27L, 408C written
1 #include "GameScreen.h"
2
3 GameScreen::GameScreen(){
4 //ctor
5 }
6
7 GameScreen::~GameScreen(){
8 //dtor
9 }
10
11 void GameScreen::loadContent(){
12
13 }//end of loadContent()
14
15 void GameScreen::unloadContent(){
16
17 }//end of unloadContent()
18 ..
>> 19 void GameScreen::update(sf::Event event){
20
21 }//end of update()
22
23 void GameScreen::draw(sf::RenderWindow &window){
24
25 }//end of draw(sf::RenderWindow &window)
~
NORMAL GameScreen.cpp unix │ utf-8 │ cpp 70% LN 19:20
"GameScreen.cpp" 27L, 408C written
1 #include "GameScreen.h"
2
3 GameScreen::GameScreen(){
4 //ctor
5 }
6
7 GameScreen::~GameScreen(){
8 //dtor
9 }
10
11 void GameScreen::loadContent(){
12
13 }//end of loadContent()
14
15 void GameScreen::unloadContent(){
16
17 }//end of unloadContent()
18 ..
>> 19 void GameScreen::update(sf::Event event){
20
21 }//end of update()
22
23 void GameScreen::draw(sf::RenderWindow &window){
24
25 }//end of draw(sf::RenderWindow &window)
error prototype for void GameScreen::update(sf::Event) doesnt match any in class GameScreen. candidate is virtual void update()
SORRY i forgot to put header code
1 #ifndef GAMESCREEN_H
2 #define GAMESCREEN_H
3 #include <SFML/Graphics.hpp>
4 #include <SFML/Window.hpp>
5 #include "InputManager.h"
6
7 class GameScreen{
8 public:
9 GameScreen();
10 virtual ~GameScreen();
11
12 virtual void loadContent();
13 virtual void unloadContent();
14 virtual void update(sf::Event event);
15 virtual void draw(sf::RenderWindow &window);
16
17 protected:
18 InputManager input;
19 std::vector<sf::Keyboard::Key> keys;
20 };
21
22 #endif
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
NORMAL GameScreen.h unix │ utf-8 │ cpp 27% LN 6:1
E488: Trailing characters
the error goes away if i take away the parameters for
void GameScreen::update(sf::Event)
but as soon as i add the parameter sf::Event the error comes back. And why would the candidate be:
void GameScreen::update()
i just dont get it. i saved everything and the function prototype looks the same as the function definition. :(