#include <windows.h>
#include <mmsystem.h>
#include <iostream>
void main()
{
PlaySound(TEXT("flip.wav"), NULL, SND_ASYNC);
system("pause");
}
此代码完美无缺。自我解释它的作用。当我在VS2012 Express IDE中进行调试时,所有内容都会编译并播放音频。保存,关闭,转到调试文件,按.exe,cmd弹出但音频不播放。再次打开IDE并进行调试,工作正常。保存,关闭,再次按.exe,仍然没有。我错过了什么因素?