C++ help!!!

Theslowone

Golden Member
Jul 30, 2000
1,779
0
0
I am writing a simple program (well not to my limited knowledge of C++), and i need to know how to read a whole sentence from a seperate file that i am ifstream into my program. I have tried making a string then my_input.get.
This is the setup of the file
11
A sentence
another sentence
and there is a list of numbers
x y
x y
x y
x y
x y
x y
x y
x y
x y
x y
x y
 

loogie

Banned
Oct 18, 1999
2,478
0
0
just parse through by chars and if the char == '\n' or '\r', then thats the end of the line... you will have to make a loop ... alternatively, you can just use the getline function.