I am trying to pull information from a file. A list of items and details about them.
The first item with details loads fine, the second item to the last becomes scrambled.
(The list of includes are what is running in my full program.)
I have tried putting the variables as strings, the programs works as far reading all of the first item with detail, then ends with:
Purple
Gift
Card
Then the program freezes and a message comes up to Break or Continue.
The output show like the style2.txt, but straight down. I have tried putting the information in the file on separate lines, same thing.
I copied all your code into VS, copied your text file, and I got the same result.
The problem is that you're not advancing to the next line in the file after you read the first set of item/details. All you have to do is a dummy 'getline' at the end of each loop iteration: