std::basic_ios<CharT,Traits>::operator!
From cppreference.com
bool operator!() const; |
||
Returns true if an error has occurred on the associated stream. Specifically, returns true if badbit
or failbit
is set in rdstate().
Contents |
[edit] Parameters
(none)
[edit] Return value
true if an error has occurred, false otherwise.
[edit] Example
Run this code
#include <cstdlib> #include <fstream> #include <iostream> int main() {