cplusplus.com cplusplus.com
cplusplus.com   C++ : Reference : IOstream Library : manipulators : resetiosflags
  Search:
- -
C++
Information
Documentation
Reference
Articles
Sourcecode
Forums
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
manipulators
boolalpha
dec
endl
ends
fixed
flush
hex
internal
left
noboolalpha
noshowbase
noshowpoint
noshowpos
noskipws
nounitbuf
nouppercase
oct
resetiosflags
right
scientific
setbase
setfill
setiosflags
setprecision
setw
showbase
showpoint
showpos
skipws
unitbuf
uppercase
ws

-

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

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

// 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

setiosflags Set format flags (manipulator function)
ios_base::unsetf Clear specific format flags (public member function)
ios_base::flags Get/set format flags (public member function)

Home page | Privacy policy
© cplusplus.com, 2000-2008 - All rights reserved - v2.2
Spotted an error? contact us