zoukankan      html  css  js  c++  java
  • setf

    ios_base::fmtflags:  使用setf函数设置 
    independent flags boolalpha read/write bool elements as alphabetic strings (true and false).
    showbase write integral values preceded by their corresponding numeric base prefix.
    showpoint write floating-point values including always the decimal point.
    showpos write non-negative numerical values preceded by a plus sign (+).
    skipws skip leading whitespaces on certain input operations.
    unitbuf flush output after each inserting operation.
    uppercase write uppercase letters replacing lowercase letters in certain insertion operations.
    numerical base
    (basefield)
    dec read/write integral values using decimal base format.
    hex read/write integral values using hexadecimal base format.
    oct read/write integral values using octal base format.
    float format
    (floatfield)
    fixed write floating point values in fixed-point notation.   ---------usually used  将浮点数用定点数表示
    scientific write floating-point values in scientific notation.                                       科学计数法
    adjustment
    (adjustfield)
    internal the output is padded to the field width by inserting fill characters at a specified internal point. 特定处补零
    left the output is padded to the field width appending fill characters at the end.            结束补零
    right the output is padded to the field width by inserting fill characters at the beginning. 开头补零

      std::cout.setf ( std::ios::showbase );  带0x 等前缀。

     

  • 相关阅读:
    Oracle EBS 更改物料说明后,在MTL_SYSTEM_ITEMS_B表中无变化
    Oracle EBS 复制用户职责
    Oracle EBS 多节点停应用
    Oracle EBS AR 更新客户
    Oracle EBS AP更新供应商地址
    Oracle EBS AP 供应商地点失效
    Oracle AP更新供应商
    string 从下标0 一直截到倒数第三位
    一个不错的spring 学习博客
    Filter及FilterChain的使用详解
  • 原文地址:https://www.cnblogs.com/gaoxianzhi/p/3222713.html
Copyright © 2011-2022 走看看