ios_base::flags
Sets or returns the current flag settings.
fmtflags flags( ) const;
fmtflags flags(
fmtflags fmtfl
);
매개 변수
- fmtfl
The new fmtflags setting.
반환 값
The previous or current fmtflags setting.
설명
See ios_base::fmtflags for a list of the flags.
The first member function returns the stored format flags. The second member function stores fmtfl in the format flags and returns its previous stored value.
예제
// ios_base_flags.cpp
// compile with: /EHsc
#include <iostream>
#include <fstream>
int main ( )
{
using namespace std;
cout << cout.flags( ) << endl;
cout.flags( ios::dec | ios::boolalpha );
cout << cout.flags( );
}
요구 사항
Header: <ios>
네임스페이스: std