Hi,everyone, got some problems with adding music
here is my code
void Ship::setLocation(float xValue,float yValue)
{
move(xValue,yValue);
sf::Music Bgm;
if(Bgm.openFromFile("Star_Wars.ogg"))
cout << "error";
Bgm.play();
}
this is part of my assignment, i want to play music while my ship(part of game) is moving, i got no errors when i compiled it, but when i try to run it, i got a problem that i cant understand(i attach the screenshot)
hope can get some help.