5.cout控制格式
Posted foremember
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了5.cout控制格式相关的知识,希望对你有一定的参考价值。
使用hex和oct以上述三种格式显示十进制值42。默认格式为十进制,在修改格式之前,原来的格式将一直有效
void hexoct2(void) { int chest=42; int waist=42; int inseam=42; cout<<"monsieur cuts a striking figure!"<<endl; cout<<"chest="<<chest<<" (decimal for 42)"<<endl; cout<<hex;//manipulator for changing number base cout<<"waist="<<waist<<" (hexadecimal for 42)"<<endl; cout<<oct;//manipulator for changing number base cout<<"inseam="<<inseam<<" (octal for 42)"<<endl; cin.get(); }
以上是关于5.cout控制格式的主要内容,如果未能解决你的问题,请参考以下文章
SQLite 片段函数实现不会在 TextView 中将文本格式化为 HTML
全栈编程系列SpringBoot整合Shiro(含KickoutSessionControlFilter并发在线人数控制以及不生效问题配置启动异常No SecurityManager...)(代码片段