GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • cpprefjp - C++日本語リファレンス
  • GitHub Project

This view

  • Original page
  • New address

GeezerVison is showing cpprefjp.github.io — std::hexfloat - cpprefjp C++日本語リファレンス

  1. リファレンス
  2. ios
  3. hexfloat

最終更新日時: 2025年07月12日 02時16分44秒 (JST)
Koichi Murase が更新

履歴 編集

function
<ios>

std::hexfloat(C++11)

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

概要

浮動小数点数を十六進法で入出力することを指示するマニピュレータ。

printf()関数の%a/%A相当。

効果

str.setf(ios_base::fixed | ios_base::scientific, ios_base::floatfield)を実行する。

戻り値

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

例

defaultfloatを参照。

バージョン

言語

  • C++11

処理系

  • Clang: 3.0 ✅
  • GCC: 5.0 ✅
  • Visual C++: 2008 ✅, 2010 ✅, 2012 ✅

備考

  • GCCは12.0時点で、入力ストリームでのhexfloatの使用に対応していない。使用すると値0が入力される (エラーにならない)
    • Bug 81122 - [DR 2381] parsing f stopped after '0' when reading std::hexfloat >> f;

参照

  • defaultfloat
  • fixed
  • scientific
  • N1503 Proposed Additions to TR-1 to Improve Compatibility with C99
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.