home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / cplus / 16511 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  1.2 KB

  1. Path: sparky!uunet!mcsun!uknet!siesoft!huw
  2. From: huw@siesoft.co.uk (Huw Roberts)
  3. Newsgroups: comp.lang.c++
  4. Subject: iostreams bug in BC?
  5. Summary: I have an iostream program which behaves differently in BC++ and cfront
  6. Keywords: whitespace; stream; borland; cfront; fail
  7. Message-ID: <1992Nov18.154925.5930@siesoft.co.uk>
  8. Date: 18 Nov 92 15:49:25 GMT
  9. Sender: news@siesoft.co.uk (Usenet News)
  10. Organization: Siemens Nixdorf Information Systems Ltd.
  11. Lines: 22
  12. X-Newsreader: Tin 1.1 PL4
  13.  
  14. I have a problem with BC++ 3.1.  I'm not sure what the correct behaviour is
  15. so I can't tell whether or not it's a bug.  The program certainly behaves
  16. differently on cfront:
  17.  
  18.     ...
  19.     istrstream fred (" 35    ");
  20.     int x;
  21.     fred >> x >> ws;
  22.     if (fred.fail())
  23.     cout << "You're kidding!`n";
  24.  
  25. Borland produces the message, cfront does not.
  26.  
  27. * Is this a bug in the Borland iostream library?
  28. * Does anyone have a reference to an ARM equivalent for the stram library -
  29.   The C++ Programming Language (2nd Ed.) doesn't go into quite enough detail
  30.   in this area.
  31.  
  32. Huw
  33. --
  34. Huw Roberts (huw@siesoft.co.uk) Siemens Nixdorf Information Systems Ltd.
  35. +44 344 850982                  Oldbury, Bracknell, Berks. RG12 4FZ England
  36.