3
我必須編寫一個在VLC中播放指定歌曲的C++代碼。我做了一些研究,但沒有發現太多。如何在vlc中用C++播放mp3文件
#include <iostream>
#include <string>
//#include "VLCWrapper.h"
//#include<libvlccore.dll>
//#include<libvlc.dll>
using namespace std;
int main()
{
cout << "Welcome to VLC launcher program!" << endl;
cout << "Please enter a filename: ";
string filename;
getline(cin, filename);
string comm = "vlc \"";
comm += filename + "\"";
system(comm.c_str()); //call VLC with the file "filename"
return 0;
}
這就是我發現,但是當我編譯出現「VLC」不被識別爲內部或外部的命令運行的程序或批處理文件。我需要一些幫助。
它的工作原理。謝謝! – viorel222