From: sparhawk AT eunet DOT at (Gerhard Gruber) Newsgroups: comp.os.msdos.djgpp Subject: Re: C++ file streams: help with reporting errors Date: Wed, 05 Aug 1998 22:19:23 GMT Organization: EUnet Austria Lines: 24 Message-ID: <35cdd7d6.2285162@news.Austria.EU.net> References: NNTP-Posting-Host: e038.dynamic.vienna.at.eu.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Date: 5 Aug 1998 22:20:15 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Content-Transfer-Encoding: 8bit Precedence: bulk Destination: sl AT psycode DOT com DOT REMOVE_THIS From: Gruber Gerhard Group: comp.os.msdos.djgpp Date: 5 Aug 1998 03:04:49 GMT: > I know that in PASCAL, when file I/O fails the reasoning behind the >failure can be tracked down by monitoring the value of IORESULT.. What >I am wondering is when I make use of fstream, ifstream and ofstream... >How do I know the reasoning behind fstream::fail()? I'd like to be >able to report the problem back to the user, but I have no idea where >to retrieve the reasoning from.. Please help, I'm not sure if this is still true with C++ but normally in C you would use errno. I guess that this hasn't changed. -- Bye, Gerhard email: sparhawk AT eunet DOT at g DOT gruber AT sis DOT co DOT at Spelling corrections are appreciated.