How to store searched elements in an array

Hi I'm rather new to c++ and have a homework assignment that requires me to make a .txt file with names and numbers then read in the file for input and store the items from the .txt file in an array as they are input.

Any explanations for possible syntax to store values read from a .txt file into an array then being able to cout them would be helpful.

I do not know how to store the data in an array because the size of the array is unknown. I would use either std::list or std::vector.
Topic archived. No new replies allowed.