Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Game
- {
- public:
- Game();
- void run();
- private:
- void processEvents();
- void update();
- void render();
- sf::RenderWindow window; // instantiated object from class RenderWindow
- };
- void Player::drawPlayer()
- {
- window.draw(playerImage); // window is undeclared from class game in another header file
- }
- /* Steps reproduced
- * made sf::RenderWindow window inside a void friend function, didnt work
- * made sf::RenderWindow window a aurgment of a function, did not work.
- * ERROR MESSAGE:
- * Error use of undeclared identifier 'window' 25:9
- *Error ‘window’ was not declared in this scope 25:9
- *Error ‘window’ was not declared in this scope
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement