Hello all,
I have an assignment where I have to take a text file of music albums and read them into a struct, then alphabetize the songs within each album and then alphabetize the albums. My problem is getting the data read into the struct. I think if I can pass that hurdle, I can do the sorting. Here is the structure of the input file.
NAME OF ALBUM #1
Name of Singer #1
Name of Singer #2
Name of Singer #3
1. Song #1
2. Song #2
3. Song #3
====================
NAME OF ALBUM #2
...
The name of the album is in all caps, the artists are one per line, the songs each have a number in front of them and each album is separated by a row of equal signs.
Now, here are the limitations.
We have not covered vectors yet (don't ask me why) so I'm confined to using arrays and structs. We have not covered regular expressions, and so I have ABSOLUTELY no clue how to check for things like "if a line is all caps then read it into album[0].title". Furthermore I don't know how to increment my loop counter so that everytime I hit a line of equal signs I read the next block of lines into my next struct.
I understand you aren't here to do my homework for me. Please help me at least get data read into the struct.
Thanks.