摘要: 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 阅读全文
posted @ 2013-05-12 22:27 Leung文 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2013-05-12 16:11 Leung文 阅读(126) 评论(0) 推荐(0) 编辑