Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>ios::fail</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
ios::fail

Usage

   #include <iostream.hpp>
   int ios::fail() const;

Description

   Equivalent to (rdstate() & (ios::failbit | ios::badbit)).

Example 

   double d;

   ifstream infile("somefile.dat");
       // a file sourced istream
   infile >> d;

   if (infile.fail())
       cout << "Bad data in input file\n";

Return Value

   Returns non-zero value if failbit or badbit set.





Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson