Namespaces
Variants
Actions

std::basic_ios<CharT,Traits>::operator!

From cppreference.com
< cpp‎ | io‎ | basic ios
 
 
 
 
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

#include <cstdlib>
#include <fstream>
#include <iostream>
 
int main()
{