Here, you are exceeding the upper bound of your array:
Code:
for (index = 0; index < 5; index ++)
should be:
Code:
for (index = 0; index < 4; index ++)
Here is one recommendation, try this:
Code:
cout << "Please enter the number of the song that you want";
cin >> song2;
cout << endl << "you have chosen " << songs[0];
change to:
Code:
cout << "Please enter the number of the song that you want";
cin >> song2;
cout << endl << "you have chosen " << songs[song2-1]; //will adjust the user's choice to return the desired element from the array