Help with reading from file.

I need to make a function continue to read 3 pieces of data from the file each loop until it gets to the end of the file. How would I go about creating such a loop?
Last edited on
1
2
3
4
5
6
std::ifstream infile( datafile ) ;
double a, b, c ;
while( infile >> a >> b >> c )
{
      // whatever 
}
Topic archived. No new replies allowed.