So i made a simple class that has a member var of type SDL_Rect... I declare it in the default constructor and then try to use a getter that returns the SDL_Rect values (x, y, w, h) but when I do i get the error: Undeclared Identifier...
This variable is declared, but it has been a long day of work and I think I might be missing something simple.
Here is the class:
The error occurs on last method getDimensions()
Please help...
/>
This variable is declared, but it has been a long day of work and I think I might be missing something simple.
Here is the class:
class Paddle { private: SDL_Rect dimensions; public: Paddle(); //getters SDL_Rect getDimensions(); //moving void moveRight(); void moveLeft(); }; Paddle::Paddle() { dimensions.x = 0; dimensions.y = 0; dimensions.w = 150; dimensions.h = 40; } SDL_Rect getDimensions() { return dimensions; }
The error occurs on last method getDimensions()
Please help...
