TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: FRANK MASINGILL
from: WAYNE SCHROEDER
date: 1997-05-26 22:17:00
subject: Re: getline?

 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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.