Hi. Well my problem is this: I have a small game, which is divided into three "stages. " The first is the initial screen (it only shows a static image) and has no music, then pressing a key change to the next stage. The second stage is the game screen. Here I start to play background music (by pressing a key in the initial stage, I call Play of the object "sf:: Music "). Then, win or lose the game, I move to a third stage (the final stage). In the final stage, I draw the last frame I drew in the game screen, and also a message (sf:: string) that says if you won or not. Here what I do is stop playing the music (when I'm checking if he wins or loses in the game screen I pause playback). Also what I do is give to the player the possibility to restart the game(returning to the game screen). When I do this I want to play music again and visual studio 2008 throws an exception.
What could be the problem? I'm using pointers to a single object "sf:: music".
I could not find a similar problem in the forum.
I tried to play and pause the music within the game screen by using two different keys and it works perfect. The problem is when I want to change the final stage to the game screen again.