I have a 3-4 sec piece of alarm sound (system failure) and i want to play it through c++ on windows. Im making a console app, and when something fails i want to add the "system failure" sound (yes, like the one on "lost").
I want to add it into a loop. so anywais, how do i do that?
Don't use #pragma s as the aren't portable.
To change linker settings ( ie adding a library ) use the IDE project properties, a makefile or the pass your compiler the right arguments
A popular solution is to use the SFML library, SDL, etc. libraries. For more defined and better controlled sound, OpenAL is currently the free standard. OpenAL really isn't difficult to use either.