把x用八進制,十進制、十六進制的形式列印,把y用布林值的形式列印:
int x = 10; cout << oct << x << endl; //show octal cout << dec << x << endl; //show decimal cout << hex << x << endl; //show hexadecimal int y = 1; cout << boolapha << y << endl; //show bool
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/61738.html
標籤:C++
上一篇:樹結構基礎
