关于playsound函数
我在VS2017里调用Playsound函数,但是该函数找不到wav的位置发出了缺省声音,求大佬帮我解决下~代码如下:
#include <iostream>
#include <stdlib.h>
#include <Windows.h>
#include <conio.h>
#include <mmsystem.h>
#pragma comment(lib,"WINMM.LIB")
using namespace std;
int main()
{
int a = _getch();
if (a == 'a')
{
PlaySound((LPCWSTR)"E:\\K.wav",NULL, SND_FILENAME|SND_ASYNC);
}
system("pause");
return 0;
}