Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
Miscellaneous
IOstream Library
manipulators
classes:
filebuf
fstream
ifstream
ios
iostream
ios_base
istream
istringstream
ofstream
ostream
ostringstream
streambuf
stringbuf
stringstream
objects:
cerr
cin
clog
cout
types:
fpos
streamoff
streampos
streamsize
ios_base
ios_base::ios_base
ios_base::~ios_base
member classes:
ios_base::failure
ios_base::Init
member functions:
ios_base::flags
ios_base::getloc
ios_base::imbue
ios_base::iword
ios_base::precision
ios_base::pword
ios_base::register_callback
ios_base::setf
ios_base::sync_with_stdio
ios_base::unsetf
ios_base::width
ios_base::xalloc
member types:
ios_base::event
ios_base::event_callback
ios_base::fmtflags
ios_base::iostate
ios_base::openmode
ios_base::seekdir


ios_base::unsetf

public member function
void unsetf ( fmtflags mask );

Clear specific format flags

Clears the format flags corresponding to the bits set in parameter mask.

The parameterized manipulator resetiosflags behaves in a similar way as this member function.

Parameters

mask
Bitmask specifying the flags to be cleared. The flags are specified as a combination of flags of the member type fmtflags.

Return Value

none

Example

1
2
3
4
5
6
7
8
9
10
11
12
// clearing flags
#include <iostream>
using namespace std;
int main () {
  cout.setf ( ios_base::hex, ios_base::basefield );  // set hex as the basefield
  cout.setf ( ios_base::showbase );                  // activate showbase
  cout << 100 << endl;
  cout.unsetf ( ios_base::showbase );                // deactivate showbase
  cout << 100 << endl;
  return 0;
}


The execution of this example displays something similar to:

0x64
64

See also