getline comparison + audiobooks
I am trying to read a formatted file where the first two characters in each line denotes the type of line it is, it's related to music.
For instance "T:" denotes its the title.
One song can have many titles (there folk songs) which will be on consecutive lines in the same file
I want to make it so if one song has many titles they are output to the screen using apostrophes to space them.
T:Mullingar Lee, The
T:Nine Pint Coggie, The
I dont know how to compare or check as I am using getline to read each individual line, should I use two getlines with a one line offset between them?
if(title this line and next)
output name and apostrophe
output name and endline
I thought the function peek() might work but don't think the characters are there to be read with getline. Any help would be appreciated.
Besides that I would love to get an audiobook on c++ to listen to while coding or on the bus etc.. are there any free ones or good quality pay ones that don't break the bank.