OK I'm making a simple program to make a shopping list.
I would like the program at start up to load the previous shopping list that was saved as a text file. The format is one line per entry which consists of the category or Isle, and the item description. Here's an example:
3 Dog Food
Produce Sweet Onions
I reading the first word, and then I want to read the rest of the line which may have more than one word... the problem is my code hangs... or goes into the old infinite loop. It doesn't see the end of file.
Here is my code, any help would be great. Thanks.