Why does this give an infinite loop and how do I get it to read and cout the other titles correctly?
I have a file with a song titles, the artist and the cost of the album all on separate lines.
Example: orders.txt has the following content.
Turn on the Bright Lights
Interpol
9.49
House of the Jealous Lovers
The Rapture
1.29
etc,...
I have to read these items from the file and place into variables; then cout to console in proper columns.
When I use the while (!inputFile.eof()) I get an infinite loop when I run it in console.
If I don't use the while, I only get the first Title, artist and cost in the correct format.