Getting >> to read up to \n in text files

I have this simple text file
1
2
A E I O U
A B C D E


Im doing something like this with my code

 
file >> line;


I want to receive
1
2
A E I O U // First iteration
A B C D E // Second iteration 


and NOT this
1
2
3
4
5
6
7
8
9
10
A // 1st iteration
E // 2nd iteration
I // 3rd iteration
O //  .
U //  .
A //  .
B //
C 
D //  .
E // 10th iteration 


What can i do?
I don't get it.

You want to get it as a line and not as separate characters?
std::getline(file, line)?
yep chrisname.. that was what i was searching ^_^.
I realized the answer myself minutes after posting here LOL
Thanks anyways
Last edited on
Topic archived. No new replies allowed.