• Class / Function / Type

      std::
    • Header file

      <>
    • Other / All

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

    履歴 編集

    macro
    <cstdint>

    WCHAR_MAX

    # define WCHAR_MAX implementation-defined
    

    概要

    wchar_t の最大値。

    wchar_tが符号付き整数型として定義される場合、このマクロの値は127以上となる。そうでない場合、このマクロの値は255以上となる。

    #include <iostream>
    #include <cstdint>
    
    int main()
    {
      wchar_t max_value = WCHAR_MAX;
      std::cout << static_cast<long long>(max_value) << std::endl;
    }
    

    出力例

    2147483647
    

    バージョン

    言語

    • C++11

    処理系