Boost logo

Boost Users :

Subject: Re: [Boost-users] [streams] surplus output generated
From: Agustín K-ballo Bergé (kaballo86_at_[hidden])
Date: 2009-09-11 19:27:05


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.

Agustín K-ballo Bergé.-


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