setiosflags
[manipulator] smanip setiosflags ( ios_base::fmtflags mask ); | <iomanip> |
cplusplus.com |
Set format flags
Sets the format flags specified by parameter mask.
Behaves as a call to stream's member:
setf(mask);
You must include <iomanip> to use this manipulator.
Parameters.
Return Value.
Unspecified.
This function should only be used as a stream manipulator.
Example.
// setiosflags example
#include <iostream>
#include <iomanip>
using namespace std;
int main () {
cout << hex << setiosflags (ios_base::showbase);
cout << 100 << endl;
return 0;
}
This code uses setiosflags manipulator to activate
showbase flag.
See also.
resetiosflags
iomanip manipulators