Mail Archives: djgpp/1999/04/27/14:28:16
bowman wrote:
>
> Nick J Chackowsky <nick AT arcticmail DOT com> wrote in message
> news:37252A95 DOT 5894 AT arcticmail DOT com...
> > I have Stroustrup v.3, can't find the two-line reference. Can you post
> > it or give me a chapter/page? Thanks.
>
> It is on page 647, and makes use of in_avail(). It is mentioned in
> passing, and I think it needs a little more work to actual function like
> getch(). To further complicate matters, I have the 5th printing, and I think
> the rdbuf().in_avail() needs to be rdbuf()->in_avail().
All errata for Stroustrup's 3rd edition, up through the 9th printing are
available at http://www.research.att.com/~bs/3rd_errata.html. You are
correct in your belief: errata for 6th printing "pg 647
s/rdbuf().in_avail()/rdbuf()->in_avail()/ ". Note the s/ is part of the
replacement syntax s/old/new. There is also one other errata item that I
found relevant to this question for the 7th, 8th printing.
pg 647 add after the rdbuf() example:
"Note that on some systems, it can be hard to determine if input
is available.
Thus, in_avail() might be (poorly) implemented to return 0
in cases where an input operation would succeed."
Ralph Gesler
- Raw text -