Just found this bit of code:
Quote:
string str;
getline(infile,str); // Get the frist line from the file, if any.
while (infile) { // Continue if the line was sucessfully read.
// do somethin with str here
getline(infile,str); // Try to get another line.
}
|
I edited it to put 1 example of your code in, i think if you was to test this you would find its what you want, at least i hope.
Hope it helps somewhat,
Lee.