- ios[meta header]
- std[meta namespace]
- function[meta id-type]
namespace std {
ios_base& noshowpos(ios_base& str);
}
数値出力時に正符号を出力させないことを指示するマニピュレータ。 符号付き整数・浮動小数点数に対して効果がある。
str.unsetf(std::ios_base::showpos)
を実行する。
実引数のstrオブジェクト。
#include <iostream>
int main()
{
std::cout << std::showpos << 1 << ' ' << 0 << ' ' << 1 << std::endl;
std::cout << std::noshowpos << 1 << ' ' << 0 << ' ' << 1 << std::endl;
}
- std::noshowpos[color ff0000]
- std::showpos[link showpos.md]
+1 +0 +1
1 0 1
- C++03