Meaning if you don't actually wait for the sound to finish playing and just quite the main function, your sound objects will be destroyed and you application will be terminated.
You can have a while loop that checks the status and to prevent the loop from eating up the full process time, you can add a sleep for a few milliseconds every loop iteration.
Also it's better to post short code snippets directly here as text with the [code=cpp][/code] tags rather than externally hosted or even worse posted as image.