I try to play a music file in my coding, but failed. I have my music file in the same folder which save .cpp file.
Can someone help me?
My code is:
#include <iostream>
#include <windows.h>
int main() {
PlaySound("kenny g.WAV", NULL, SND_ASYNC);
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…