--> Frank Masingill wrote to All <--
FM>void main()
Frank, please use int main(void) !!!!
FM> InFile.getline(buffer, MAX);
FM> cout << buffer;
FM> Instead of the expected result of the second file
FM>reading in the two lines as separate lines it is being read
FM>in as merged into one line. What am I doing wrong?
getline() removes the '\n' at the end of the line--it doesn't store it
in buffer. So, when you display buffer you don't get the newline.
Use cout << buffer << '\n';
Cliff Rhodes
cliff.rhodes@juge.com
X CMPQwk 1.42 1692 X"What the imagination seizes as beauty must be truth." -
John Keats
--- Maximus/2 3.01
---------------
* Origin: COMM Port OS/2 juge.com 204.89.247.1 (281) 980-9671 (1:106/2000)
|