Hi everyone.
For some reason that would be long to explain, I've got an array filled with pointers, all pointing on a Sprite address. Now I have to
Draw() theses Sprites thank to a loop. Everything seems alright, but when I run the code, here is the horrible message delivered by the programme :
Here is the part of the code dealing with it :
std::vector<sf::Sprite*> drawTable; //The array containing pointers
//The function that allows to add Sprites addresses in the array
void Drawing::addSprite(Sprite *sprite)
{
drawTable.push_back(sprite);
}
//The function that allows to display all the sprites
void Drawing::drawFrame()
{
for(i=0; i<drawTable.size(); i++)
{
m_app->Draw(*drawTable[i]); //Here is the line causing the crash !
}
i = 0;
}
The doc informs me that the
Draw() function prototype is that one :
virtual void sf::RenderTarget::Draw(const Drawable & Object) [virtual]I confess I'm a bit lost. I don't feel at ease with this concept of virtual function or else... Some one may give me some help?
Thanks for reading me, and have a good day !