delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/27/14:28:16

Message-ID: <37260199.6FFD6B6D@pacificnet.net>
Date: Tue, 27 Apr 1999 11:27:37 -0700
From: Ralph Gesler <rgesler AT pacificnet DOT net>
X-Mailer: Mozilla 4.5 [en] (Win95; U)
X-Accept-Language: en,ja
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: Challenge for C++ programmers:
References: <Pine DOT SUN DOT 3 DOT 91 DOT 990418140925 DOT 22615c-100000 AT is> <sMlS2.2355$R93 DOT 22629 AT newsfeed DOT slurp DOT net> <37252A95 DOT 5894 AT arcticmail DOT com> <eH9V2.1527$n5 DOT 4471 AT newsfeed DOT slurp DOT net>
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019