把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