How to play sound?

Hi, how would I play a sound of some one slashing a sword?!
I tried, it does not work!!!

1
2
3
4
5
6
7
8
9
10
11
12
#include <iostream>
#include <windows.h>
#include <mmsystem.h>

using namespace std;

int main(){

	 PlaySound("C:\\Slash.WAV", NULL, SND_ASYNC);

                      
}


the slash.WAV part is underlined in red!!!
then don't just sit there and expect answers, there are links on the page usandfriends gave you. One of them is http://www.dreamincode.net/forums/showtopic18352.htm another is http://msdn.microsoft.com/en-us/library/ms712879.aspx
Topic archived. No new replies allowed.