showpos
正の数を明示的に署名します。
ios_base& showpos(
ios_base& _Str
);
パラメーター
- _Str
型 ios_baseオブジェクト、または ios_baseから型への参照。
戻り値
_Str が派生したオブジェクトへの参照。
解説
noshowpos が既定値です。
マニピュレーターは、_Str.setfios_base::showpos () を呼び出し、_Strを返します。
使用例
// ios_showpos.cpp
// compile with: /EHsc
#include <iostream>
int main( )
{
using namespace std;
int i = 1;
cout << noshowpos << i << endl; // noshowpos is default
cout << showpos << i << endl;
}
必要条件
ヘッダー: <ios>
名前空間: std