+ 3
Use cin.ignore() after the last cin and before getline. The issue is that there is a character left in the stream which prevents reading the last string: https://stackoverflow.com/questions/12691316/getline-does-not-work-if-used-after-some-inputs#12691486
24th May 2022, 2:04 PM
Lisa
Lisa - avatar