The operator!() method of ios class in C++ is used to any error flag of this stream is set. This includes the failbit or the badbit.
bool operator!() const;
Parameters: This method does not accept any parameter.
Return Value: This method returns true if any error bit is set of this stream, else false.
No error bit is set.
Error bit is set.
GeeksforGeeks has prepared a complete interview preparation course with premium videos, theory, practice problems, TA support and many more features. Please refer Placement 100 for details
- ios operator() function in C++ with Examples
- ios operator() function in C++11 with Examples
- typeid operator in C++ with Examples
- Modulo Operator (%) in C/C++ with Examples
- Why overriding both the global new operator and the class-specific operator is not ambiguous?
- Operator Overloading '<<' and '>>' operator in a linked list class
- ios eof() function in C++ with Examples
- ios bad() function in C++ with Examples
- fill_n() function in C++ STL with examples
- ios good() function in C++ with Examples
- conj() function in C++ with Examples
- ios clear() function in C++ with Examples
- btowc() function in C/C++ with Examples
- norm() function in C++ with Examples
- log2() function in C++ with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.