フォーマット指定子

http://www.k-cube.co.jp/wakaba/server/format.html


指定子 対応する型 説明
%c char 文字を出力する
%s char* 文字列を出力する
%d int, short 整数を10進で出力する
%u uint, ushort 符号なし整数を10進で出力する
%o int, short, uint, ushort 整数を8進で出力する
%x int, short, uint, ushort 整数を16進で出力する
%f float 実数を出力する
%e float 実数を指数表示で出力する
%g float 実数を最適な形式で出力する
%ld long 倍精度整数を10進で出力する
%lu unsigned long 符号なし倍精度整数を10進で出力する
%lo long, ulong 倍精度整数を8進で出力する
%lx long, ulong 倍精度整数を16進で出力する
%lf double 倍精度実数を出力する
最終更新:2008年09月24日 19:14
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。