My C++ program won't get the data from the text file and store it into a struct. It compiles without any errors but it won't do what it's supposed to do.
Also note that I have a header file and a main file.
Please edit your post and make sure your code is [code]between code tags[/code] so that it has line numbers and syntax highlighting, as well as proper indentation.
One issue is that you are looping on EOF, which is wrong because EOF flag is not set until the first failed read attempt. You should loop on the input operation itself, but with your current scenario you can just change to a do-while loop. Don't increment the counters until you verify that the input succeeded.