Hi,
I'm new at C++ programming so I was writing a practice program. The idea of the program is to create some sort of listing in txt file of the books you have. So, my idea is to create an array of book structures (where you can store the title, author and year) and then write this array to a txt. The problem is that when I ask to enter the title and the author of the book (in the function getbook, lines 41-50) with the getline function it automatically stores a blank string to the first question and only lets introduce you the answer to the second question. I'm sure it's kind of a silly mistake, I would appreciate the help. Thank you very much.
Here is the code,