16
General / Re: Trying to read the value of a sf::String causes crash
« on: August 17, 2016, 01:49:36 pm »
Oh, alright. Thank you
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
This is not how SFML should be used.
Exception thrown at 0x0FDE6D16 (msvcp140d.dll) in SwEngine.exe: 0xC0000005: Access violation reading location 0xCCCCCCCC.
If there is a handler for this exception, the program may be safely continued.
The draw function accepts sf::Sprite, but not pointers to sf::Sprite. And i.second is a pointer to an sf::Sprite.
You need to dereference your pointer.window->draw(*i.second);