I am trying to do a couple things that I am not having any luck with.
1] Do i have to send ifstream to the function for the function to read data from that file? If so, what is the correct syntax?
2] I am trying to use a while(infile) loop to count how many instances of first name, Last name, and number there are. Is there a better way to do that then the way I am trying to do it? (remember, I am a beginner so no super advanced stuff please)
Sample Data:
{
Duckey Donald 85
Goof Goofy 89
Brave Balto 93
Snow White 93
}
GREAT! It works.. I finally figured it out. I have been using cin >> to read the files insted of ifile >> . Thank you for your help though.
The working code is as follows