也错的#include "stdafx.h"
#include <iostream.h>
int main(void)
{
bool b;
bool a;
cin>>a;
cin>>b;
cout<<"!a="<<!a<<endl;
cout<<"a&&b"<<(a&&b)<<endl;
cout<<"a||b"<<(a||b)<<endl;
return 0;
}--------------------Configuration: test - Win32 Debug--------------------
Compiling...
test.cpp
D:\代码\test\test.cpp(7) : error C2679: binary '>>' : no operator defined which takes a right-hand operand of type 'bool' (or there is no acceptable conversion)
D:\代码\test\test.cpp(8) : error C2679: binary '>>' : no operator defined which takes a right-hand operand of type 'bool' (or there is no acceptable conversion)
Error executing cl.exe.