最終更新日時(UTC):
が更新

履歴 編集

function
<ios>

std::noshowbase

namespace std {
  ios_base& noshowbase(ios_base& str);
}

概要

整数出力時に基数を表すプレフィックスを付与しないことを指示するマニピュレータ。 showbaseの効果を打ち消す効果がある。

効果

str.unsetf(std::ios_base::showbase)を実行する。

戻り値

実引数のstrオブジェクト。

#include <iostream>

int main()
{
  std::cout << std::hex;
  std::cout << 15 << std::endl;
  std::cout << std::showbase << 15 << std::endl;
  std::cout << std::noshowbase << 15 << std::endl;
}

出力

f
0xf
f

バージョン

言語

  • C++03

参照