I cannot find on sfml page how to deal with this error.
I can easily deal with this by making only one sf::Music and reloading it each time you change music.
#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
int main()
{
sf::RenderWindow Screen;
Screen.create(sf::VideoMode(800,600,32), "Title of the screen", sf::Style::Default);
bool is_On = true;
//Just making this here will cause the error
sf::Music* tempMusic = new sf::Music;
delete tempMusic;
//Up until here
while(is_On == true)
{
sf::Event EventList;
while(Screen.pollEvent(EventList))
{
switch(EventList.type)
{
case sf::Event::Closed:
is_On = false;
break;
default:
break;
}
}
Screen.clear(sf::Color::White);
Screen.display();
}
Screen.close();
}