reading txt into two arrays

Oct 29, 2019 at 11:22pm
I have a project where I am supposed to take this file http://www.d.umn.edu/~jallert/cs1/projects/babynames.txt and read names from a data file into two arrays (boys and girls). Count the number of names as they are read in and save that count in variable 'n'. My professor also does not wants us to use .eof(), instead using >>. I do not know how to do this, and any assistance would be greatly appreciated.
Oct 29, 2019 at 11:38pm
What part of it don’t you understand?
Oct 29, 2019 at 11:42pm
I don't know how to take that file and read and count it into two arrays.
Oct 30, 2019 at 12:59am
Are you able to write code to open a file and read data from it?

If that baffles you then you need to step back and look at dealing with files again.

http://www.cplusplus.com/doc/tutorial/files/

You need to write the code, we won't do your assignment for you.

Post code here, and we will help you.
Topic archived. No new replies allowed.