I am doing an exercise on my book and I wish to implement getline() function in my custom operator >>.
My definition is:
1 2 3 4 5 6 7 8 9 10 11 12 13
istream& operator>>(istream& is, Book& n)
{
string title, author;
int day, month, year;
char check;
is >> title >> author >> day >> month >> year >> check;
if (!is) return is;
n = Book{ title,author,day,month,year,check };
return is;
}