1
General / Noob question about classes
« on: December 09, 2010, 06:37:34 am »
Im very new to C++ myself and i have a quick class question. So i have something like this:
But i dont know how to make it so the bottom constructor sets the values for the class´s frame_img and frame_rect
Code: [Select]
class Frame{
public:
Frame( const sf::Image& img, const sf::IntRect& rec);
sf::Image& frame_img;
sf::IntRect frame_rect;
};
Frame::Frame( const sf::Image& img, const sf::IntRect& rec){
frame_img = img&;
frame_rect = rec;
}
But i dont know how to make it so the bottom constructor sets the values for the class´s frame_img and frame_rect