dimanche 21 juillet 2019

How to fix "(Song Title) is not recognized in output screen"

I am writing a music program but there are some trouble here that I could not open the music file even though I have downloaded it in my pc and put my c++ program together with the music in one file.

I have tried to convert it into a wav file instead of the default file type given upon installation of the music

class Music
{
private:
int song; //song selection
public: 
void Song_Name() //function for song selection    
{
do
{
cout<<"These are the music available: "<<endl<<endl;
cout<<"1. American Teen (Khalid) "<<endl;
cout<<"2. All We Know (Chainsmokers) "<<endl;
cout<<"3. Born To Be Yours (Kygo) "<<endl;
cout<<"4. Bodak Yellow (Cardi-B) "<<endl;
cout<<"5. Bad Guy (Billie Eilish) "<<endl;
if(song==1)
{
 system("Khalid - American Teen (Official Music Video).mp3");
}
}while(isdigit(song)!=0); //repeat again if alphabet is inputted
}
};

Expected the program will open and play the downloaded song but it shows that "(Song Title) is not recognised as an internal or external command, operable program or batch file"

Aucun commentaire:

Enregistrer un commentaire