Hello. I have a program that is supposed to read a .txt file, save the data in an array, then print out that data. I have a program that compiles, but when I run it, it does not print the first line of the .txt file, prints the second line, then does not print the third line, but stays in the run and freezes. Here's the .txt file which is named "inventory.txt" ...

Basketball 2 20.00
Baseball 3 5.00
Soccerball 5 20.00...