cppreference.com > C++ I/O > clear
clear
Syntax:
  void clear( iostate flags = ios::goodbit );
  

The function clear() clears the io stream state flags associated with the current stream. The flags argument defaults to ios::goodbit, which means that all flags will be cleared. Otherwise, only the flags specified by flags are cleared.