This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: problem with substr() or string ?


I would recommend doing a hex printf of the last character of 'field2'. You may find that 'getline' is returning the LF terminator. I would recommend replacing the stdc++ lib in gcc 2.95.2 with a later snapshot such as 2.90.7 (which I am using now). Benjamin is using this version or maybe even the latest CVS. I know that there has been extensive work done on streams in the later snapshots.

Be sure to read the docs on the cygnus site before building and installing the later snapshots as they are not drop-in replacements for the version in gcc.
(http://sourceware.cygnus.com/libstdc++/)

-- Matthew Brown

----- Original Message ----- 
From: "Dawit Yimam" <Dawit.Yimam@gmd.de>
Cc: <libstdc++@sourceware.cygnus.com>
Sent: Friday, February 04, 2000 5:56 AM
Subject: Re: problem with substr() or string ?


> Benjamin Kosnik wrote:
> 
> > I get this with CVS libstdc++-v3 on x86/linux:
> >
> > <bkoz@haight> /mnt/hd/bliss/src.libstdc++/testsuite
> > %a.out
> > 1
> > 1
> > 1
> >
> > ?
> >
> 
> As Matthew indicated, I think my poblem is with the getline. I am using
> gcc 2.95.2 (on a Solaris 2.6) and use its libstdc++. I have checked that
> I am not having a CRLF line termination problem. I seem to have a char
> at the end of the lines which the getline doesn't extract and drop. Any
> suggestion how I could track it ?
> 
> Thanks.
> 
> Dawit
> 
> 
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]