Quote:
char buffer[HPGL_TOOL_MAX_LINE_LENGTH+1];
dataFile.getline(buffer, HPGL_TOOL_MAX_LINE_LENGTH);
while(!(dataFile.eof() || dataFile.bad() || dataFile.fail()))
{
// If we're in here, then we know we got good data last time
cout << "buffer = " << buffer << endl;
// Add to the part list
partNameList.push_back(buffer);
// Get the next set of data, but make sure it's good before we do anything with it
dataFile.getline(buffer, HPGL_TOOL_MAX_LINE_LENGTH);
}
This should work fine, I think. If I'm totally off, someone please correct me, it's entirely possible that I am. :)