C
Claudio Varini
Hallo,
I have a text file (that I call Text_File) with the following values
written inside:
2 34 5
2 32 43
56 534 69
If I want to read each line and convert the numbers into integer
I use this code:
int a,b,c;
ifstream Store("Text_File")
while(!Store.eof()) {
Store >> a >> b >> c;
}
In this way I read two times the last line of the text file, and I would
like to avoid it.
Does anyone know a solution which reads the last line only once?
Thanks,
I have a text file (that I call Text_File) with the following values
written inside:
2 34 5
2 32 43
56 534 69
If I want to read each line and convert the numbers into integer
I use this code:
int a,b,c;
ifstream Store("Text_File")
while(!Store.eof()) {
Store >> a >> b >> c;
}
In this way I read two times the last line of the text file, and I would
like to avoid it.
Does anyone know a solution which reads the last line only once?
Thanks,