Trouble using the getline function in do/while loops

I'm creating a program that allows you to enter up to 100 books and the books information such as Title, Author(s), Publisher, ISBN, Cost. I'm using the getline function so that I can read the entire title of a book. The problem I'm having is that when I go to enter the second book, the program skips over the title and goes straight to asking to enter the author of the book. I"m using a do/while loop to check if I want to keep entering books or not. Is there a way to fix the getline function so that it doesn't skip entering the title for the second book?
Last edited on
Thanks that helped a lot, but now I have a new problem when I search the array for a book by the title I can't find the first book entered.
For that question, on searching the array, I think you will need to post the code that you have written, in order to get any useful assistance.
Topic archived. No new replies allowed.