delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/27/22:59:23

Message-ID: <013201be9124$d009b5a0$77023ace@alpha1>
From: "Brian Bacon" <lbiggs AT coho DOT net>
To: <djgpp AT delorie DOT com>
Subject: Re: Challenge for C++ programmers:
Date: Tue, 27 Apr 1999 20:11:29 -0700
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Reply-To: djgpp AT delorie DOT com

Just a little note...
    Such is the case with MS's Visual C++ v5.0 and 6.0 libraries...
In_Avail() returns zero... always... I found this out while trying to solve
the afore-mentioned challenge :)

        -Brian



-----Original Message-----
From: Ralph Gesler <rgesler AT pacificnet DOT net>
To: djgpp AT delorie DOT com <djgpp AT delorie DOT com>
Date: Tuesday, April 27, 1999 11:40 AM
Subject: Re: Challenge for C++ programmers:


>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