Reading from a text file.

The idea of this application is to read words stored in a text file.
For example, I have a text file with three names on it, two separated by a white space. and then a third name separated by a line.
// ex:
Brandon Josh
Dish
//
Is there a way to read those words, and assign them to their own string?
1
2
3
4
5
6
7
8
    if (filein.is_open())
    {
		while ( filein.good() )
		{
		filein >> value;
		cout << value << endl;
		}	
    }


Then just assign value to some string, you can do that with a for loop and an array, or you could just do string A, B, C;
thank you
Topic archived. No new replies allowed.