• Class / Function / Type

      std::
    • Header file

      <>
    • Other / All

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

    履歴 編集

    function
    <ios>

    std::uppercase

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

    概要

    出力時に英大文字を使用することを指示するマニピュレータ。 hexscientifichexfloatなどと組み合わせることで効果がある。

    効果

    str.setf(std::ios_base::uppercase)を実行する。

    戻り値

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

    #include <iostream>
    
    int main()
    {
      std::cout << std::uppercase;
      std::cout << std::hex << std::showbase << 0xbeef << std::endl;
      std::cout << std::scientific << 1e+23 << std::endl;
      std::cout << std::hexfloat << 1234.5 << std::endl;
    }
    

    出力

    0XBEEF
    1.000000E+023
    0X1.34A000P+10
    

    バージョン

    言語

    • C++03

    参照