delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/05/18:45:22

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: <iCdMCj1ZQ5j2-pn2-TjViGBfRZJdu AT portF03 DOT Generation DOT NET>
NNTP-Posting-Host: e038.dynamic.vienna.at.eu.net
Mime-Version: 1.0
NNTP-Posting-Date: 5 Aug 1998 22:20:15 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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.

- Raw text -


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