Possible Duplicate:
How would std::ostringstream convert to bool?
#include<iostream.h>
void main() {
if(cin>>2) { // what is cin>>2 doing inside arg of if
cout<<"if works";
} else {
cout<<"else works";
}
}
We don't get error in this code.But Alwaysif
statement works why? how?