2
我試圖使用PlaySound,我把的#pragma評論(LIB,「WINMM.LIB」)不工作
#include <windows.h>
#include <mmsystem.h>
#pragma comment(lib, "Winmm.lib")
using namespace std;
int main()
{
PlaySound(L"C:\\Users\\iD Student\\Downloads\\HarryPotter.mp3", 0, SND_FILENAME);
}
,而不是和玩我想它的聲音,它打出了一些默認的Windows聲音。
你確定那是播放聲音的方式嗎?您實際上不會[調用函數](https://msdn.microsoft.com/en-us/library/windows/desktop/dd743680%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396)在這個代碼中。 – tadman
這就是我放在我的代碼頂部。實際的代碼是PlaySound行 –
請發佈*實際代碼*然後編輯您的問題。 – tadman