Boost logo

Boost Users :

Subject: Re: [Boost-users] [streams] surplus output generated
From: Sven Heithecker (sven.heithecker_at_[hidden])
Date: 2009-09-12 04:32:59


Am Samstag, 12. September 2009 schrieb Agustín K-ballo Bergé:
> Sven Heithecker escribió:
> > Hi all,
> >
> > the code below using boost::iostream produces unwanted surplus
> > output:
> >
> > streamsize write(const char *s, streamsize n)
> > {
> > cout << "Write: " << s;
> > return(n);
> > }
>
> My guess is you should only read up to n chars. Try copying n chars
> from s, and outputing those.
>

Hi,

brilliant idea - works like a charm ! Thanx for help.

Regards, Sven

-- 
Sven Heithecker
GPG Fingerprint: 52F7 06C2 BF51 96CE DFF7 CC89 1A6B DFD5 BEC2 02A6

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net