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