Message-ID: <37260199.6FFD6B6D@pacificnet.net> Date: Tue, 27 Apr 1999 11:27:37 -0700 From: Ralph Gesler 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: <37252A95 DOT 5894 AT arcticmail DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com bowman wrote: > > Nick J Chackowsky 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