ios_base::flags
設定します。現在のフラグの設定。
fmtflags flags( ) const;
fmtflags flags(
fmtflags fmtfl
);
パラメーター
- fmtfl
fmtflags の新しいセット。
戻り値
fmtflags の前または現在のセット。
解説
フラグの一覧の ios_base::fmtflags を参照してください。
一つ目のメンバー関数は、格納されている形式フラグを返します。 2 つ目のメンバー関数は、書式指定フラグで fmtfl を保存し、前に格納されている値を返します。
使用例
// 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( );
}
必要条件
ヘッダー: <ios>
名前空間: std