Fw: [Dev-C++] first time error return on checking file stream validity
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Alan T. <ala...@3n...> - 2000-12-31 17:08:29
|
Sorry --- I was sending in HTML vice plain text format.
----- Original Message -----
From: Alan Thomas
To: dev...@li...
Sent: Sunday, December 31, 2000 12:03 PM
Subject: RE: [Dev-C++] first time error return on checking file stream
validity
No, the point was to create an invalid file stream, so I can test my
functions to ensure they react correctly to this error. The problem is
that on the first call to the function, it does not return an error. On the
second and subsequent calls, it does return an error.
How does anyone else out there test these sorts of things?
Thanks, Alan
From: "Ioannis Vranos" <no...@ya...>
To: <dev...@li...>
Subject: RE: [Dev-C++] first time error return on checking file stream
validity
Date: Sun, 31 Dec 2000 17:21:13 +0200
Reply-To: dev...@li...
This is a multi-part message in MIME format.
------=_NextPart_000_0000_01C0734E.13A04DD0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
I have the impression you do not create or open any file, e.g. std::ofstream
invalid("test.txt");
I do not know much about C++ file operations yet but i think this is the
problem.
Ioannis
-----Original Message-----
ofstream invalid; // used to test for error opening file
|