【ThinkingInC++】2、输入和输出流

/**
*特征:输入和输出流
*时间:2014年8月8日07:37:35
*作者:cutter_point
*/

#include<iostream>

using namespace std;

int main()
{
    cout<<"a number in decimal:"<<dec<<15<<endl;    //十进制输出
    cout<<"in octal:"<<oct<<15<<endl;   //八进制17
    cout<<"in hex:"<<hex<<15<<endl;     //十六进制f
    cout<<"a floating-point number:"<<3.1415926<<endl;  //浮点数自己主动识别
    cout<<"non-printing char(escape):"<<char(27)<<endl; //输出27代表的字符ASCII码
}


十进制,八进制,十六进制。C++输出模式!

原文地址:https://www.cnblogs.com/mengfanrong/p/5042598.html