cout << boolalpha << y<<endl;
#include<iostream>
#include<stdlib.h>
using namespace std;
int main(void)
{
int x = 0;
cout <<"请输入一个整数:"<<endl;
cin >>x;
cout <<oct << x <<endl;
cout << dec <<x <<endl;
cout << hex <<x <<endl;
cout <<"请输入一个布尔值(0,1):"<< endl;
bool y = false;
cin >> y;
cout << y<<endl;
system("pause");
return 0;
}
问题:我没有输入boolalpha结果也是一样的??