resetiosflags


manipulator function
<iomanip>
smanip resetiosflags ( ios_base::fmtflags mask );

Reset format flags

Unsets the format flags specified by parameter mask.

This manipulator behaves like the stream's member ios_base::unsetf.

This manipulator is declared in header <iomanip>, along with the other parameterized manipulators: setiosflags, setbase, setfill, setprecision and setw. This header file declares the implementation-specific smanip type, plus any additional operator overload function needed to allow these manipulators to be inserted and extracted to/from streams with their parameters.

Parameters

mask
Mask representing the flags to be reset.
This is an object of type ios_base::fmtflags which can take any combination of its possible values (see ios_base::fmtflags).


Return Value

Unspecified. This function should only be used as a stream manipulator.

Example

1
2
3
4
5
6
7
8
9
10
11
// resetiosflags example
#include <iostream>
#include <iomanip>
using namespace std;

int main () {
  cout << hex << setiosflags (ios_base::showbase);
  cout << 100 << endl;
  cout << resetiosflags (ios_base::showbase) << 100 << endl;
  return 0;
}


This code first sets the showbase flag and then resets it using the resetiosflags manipulator. The execution of this example displays something similar to:

0x64
64


See also