On Mon, Jan 06, 2003 at 09:41:01PM +0100, Lars Gullik Bjønnes wrote:
> | A single char obviously can't be '\r\n'. So I'd indeed expect a '\r' at the
> | end of the string read by getline(...'\n') -- unless this has something
> | to do with that 'binary mode' vs 'text mode' and the \r is removed earlier.
> | Somehow...
> 
> This is exactly what I think...

The problem is, not to many people here have a Windows development system
to check. The ifstream in question is not opened in binary mode as far as I
can tell, so optically it should work. Nevertheless, the '\r' show up for
the Windows people...

rtrim('\n')  eats a few cycles but does no other harm on *nix. At least as
workaround it should be ok.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)

Reply via email to