标签:Nging get ber end 格式 int col 使用 hex
使用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(); }
标签:Nging get ber end 格式 int col 使用 hex
原文地址:https://www.cnblogs.com/foremember/p/10472240.html