abrowning
April 7th, 2008, 09:43 AM
Hi. I am trying to get input as a string and when I do this code segment:
string artist;
cout << "Enter the artist of the album you wish to delete ->";
getline (cin, artist);
it displays the prompt but then "Press any key to continue" and exits the program. iostream.h is included. Am I using getline incorrectly?
string artist;
cout << "Enter the artist of the album you wish to delete ->";
getline (cin, artist);
it displays the prompt but then "Press any key to continue" and exits the program. iostream.h is included. Am I using getline incorrectly?