摘要:
int main(int argc, char* argv[]){ unsigned short x=3,y=5; cout<<"~x="<<(unsigned short)~x<<endl;//位求反 cout<<"~x="<<~x<<endl;//位求反 cout<<"x&y="<<(x&y)<<endl;//位与 cout<<"x^y="<<(x^y)<&l 阅读全文
摘要:
bool func1(int a){ return a < 5;}struct func2: public unary_function<int, bool>{ bool operator()(int a) { return a < 5; }};struct func3: public binary_function<int, int, bool>{ bool operator()(int a, int b) { return a == b; }};int main(int argc, char* argv[]){ l... 阅读全文