Reading a file into an array

Just wanted to know how to read a text file into an array. Im having a lot of trouble with this..thanks
What's in the text file - numbers? Words? Sentences? Pies?
words

eg.
john
james
jason

1 word per line
Here you go: http://nopaste.com/p/aJIUIcWaf

I recommend using a vector instead of a raw array because vector methods are more comfortable and safer (e.g. at(x) checks, if x lies within the borders).
i need the text file into a string array not a vector...im not up 2 learning vectors yet :(
Then just replace it with an array!? What changes is that you have to determine the array's size before and must access the elements with the []-operator instead of push_back() and at().
Topic archived. No new replies allowed.