Dear Community,
I don't know how to express this problem explicitly..
I set a class like this:
class Image {
public:
void init();
void show();
private:
Sprite spr;
};
and a vector like vector <Image*> pics;
init() could initialize spr and pics.push_back(this) and show() is just window.draw(spr); and window.display();.
Here comes the problem. When it comes to pics[0]->show();, the screen becomes whole white.
I'm sure the problem is from the sentence pics[0]->show();, because when I delete it and put show() at the bottom of init(), everything works fine.
I hope you can understand what I was saying according to the attaching sceenshots, because my expression was really poor.
Best regards.