C++学习笔记——播放音乐

时间:2025-03-15 07:34:59
#include<iostream> #include<> #include<> #include<> //媒体控制函数的头文件 using namespace std; int main(){ char play[]="play "; //play后有空格 char song[]="甜蜜蜜.mp3"; strcat(play, song); cout<<play<<endl; mciSendString(play,NULL,0,NULL); char c; cin>>c; //输入任意字符结束播放 return 0; }