FM> InFile.getline(buffer, MAX);
FM> cout << buffer;
FM> Instead of the expected result of the second file reading in the
FM> two lines as separate lines it is being read in as merged into one
FM> line. What am I doing wrong?
it is working.. you are just missing a \n or endl
cout << buffer << endl;
getline gets a array of char (of maximum MAX) from stream until CR...
it doesn't include the trailing \r\l (or \n or endl... which ever you like to
refer to).
Wayne
=[Visit the RazSoft Homepage]=[http://www.sound.net/~fileland]=
--- FMail/386 1.22
---------------
* Origin: =(Mental Floss)=(913-383-2925)= (1:280/191)
|