#include
#include
int main(int argc, char *argv[])
{
if (argc > 1) {
std::cout << "Playing the file: " << argv[1] << '\n';
std::string command = "\"C:/Program Files/Windows Media Player/wmplayer.exe\" ";
std::system((command + argv[1]).c_str());
}
else
std::cerr << "usage: musicplayer \"media file\"\n";
}
No comments:
Post a Comment