w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Won't let me enter information next time through the while (true) loop

You need to discard the new line that was left in the stream from the last input operation. Use std::cin.ignore() for that:

std::cout << "Enter song title - XYZ to quit: ";

std::cin.ignore();                                                         
   /*
^^^^^^^^^^^^^^^^^^                                                         
   */
std::cin.getline(song, 256);




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.