NOTE:
These are a little sketchy...I'll fill in details 'soon'.
Jason James Tammy James George Freedman Smith Barney Mr. Bubble
0 12 24 40 53
x = 4 y = 9 z = 8 x=-3 z=-9 y=-4 y=5 z=9 y=8 x=12 x=3 y=7 z=7
0 18 33 41 50
// open data file for input
// skip any comments and line up at position of first data item
// open index file for output -- we are creating it
first_data = data_loc = datafile.tellg();
datafile.peek();
while (!datafile.eof())
{
data.input(datafile);
indexfile << data_loc << ' ';
data_loc = datafile.tellg();
datafile.peek();
}
indexfile.close(); // done with written version -- now use
// to read
datafile.clear(); // clear eof flag
datafile.seekg(first_data); // reset to beginning