bool y如果输入其他数字为什么一概为false?不是说非零就为true吗?
#include<iostream>
#include<stdlib.h>
using namespace std;
int main(void)
{
int x=0;
cout<<"Please input a integer:";
cin>>x;
cout<<oct<<x<<endl;
cout<<dec<<x<<endl;
cout<<hex<<x<<endl;
cout<<"Please input a bool:";
bool y=false;
cin>>y;
cout<< boolalpha << y << endl;
system("pause");
return 0;
}