Original Post
I''m a little fuzzy on how to do something like this:
class Hotspot
{
public:
Hotspot(SDL_Rect r);
SDL_Rect bounds(void);
private:
SDL_Rect _rect;
};
Hotspot::Hotspot(SDL_Rect r)
{
_rect.x = r.x;
_rect.y = r.y;
_rect.w = r.w;
_rect.h = r.h;
}
SDL_Rect Hotspot::bounds(void)
{
return _rect;
}
Now if SDL_Rect were a class, complete with copy constructors, I would expect this to work. But SDL_Rect is a simple struct. So how do I deal with this?
-Solstice
deninet.com
aeris.deninet.com
"...I was given three choices, the earth, the stars, or..."