Hi Gurus,

I have this problem. I am reading data from a file, simple text lines. The program works fine on windows, however, on unix, it reads the last line twice ... I am perplexed.

Here's the code:

Code:
while(!(dataFile.eof() || dataFile.bad() || dataFile.fail()))
{
    char buffer[HPGL_TOOL_MAX_LINE_LENGTH+1];

    dataFile.getline(buffer, HPGL_TOOL_MAX_LINE_LENGTH); 

cout << "buffer = " << buffer << endl;
			
    // Add to the part list
			
    partNameList.push_back(buffer);
}
The output (on unix) is:

buffer = /if/21174/2117400-1.prt
buffer = /if/21378/2137813-0.prt
buffer = /if/21378/2137813-0.prt

The data file is:

/if/21174/2117400-1.prt
/if/21378/2137813-0.prt

Please help!
Kamran