Im trying to open a file. The user enters the name of the file they want to open example
string fname;
string pick;
cin>>fname;
cout<<"Do you want to open the file?";
cin>>pick;
if(pick=="yes")
system("wmplayer.exe fname");
else
cout<<"Thanks for your time;
Can someone show me how the replace the fname above with the name the user entered or a way to tell the system command that thats the file i want to open. Lets say fname is sound.mp3