(C++) Read numbers from text file

I have a text file that looks like this:
1
2
3
4
5
6

I want to read this numbers and put them into a vector. How do I do that?
1. Define a vector (see Cplusplus.com Reference for Container).
2. Open the file (see Cplusplus.com Reference for IOstream).
3. In a loop do read your numbers and put them into the vector.
4. Close your file and terminate your process.
Topic archived. No new replies allowed.