ofstream.fail() Demo : ofstream « File « C++
- C++
- File
- ofstream
ofstream.fail() Demo

#include <fstream>
#include <iostream>
using namespace std;
int main ()
{
ofstream outfile;
outfile.open("file.dat");
cout << "( outfile) = " << outfile << endl;
cout << "( outfile.fail()) = " << outfile.fail() << endl;
return 0;
}
Related examples in the same category