摘要:
#include <iostream> #include <vector> #include <algorithm> #include <functional> using namespace std; class Print { public: void operator()(bool b) { 阅读全文
posted @ 2022-07-31 11:42
thomas_blog
阅读(17)
评论(0)
推荐(0)
摘要:
#include <iostream> #include <vector> #include <algorithm> #include <functional> using namespace std; class Print { public: void operator()(int i) { c 阅读全文
posted @ 2022-07-31 11:03
thomas_blog
阅读(25)
评论(0)
推荐(0)
摘要:
#include <iostream> #include <functional> using namespace std; int main() { plus<int> p; cout << p(10, 20) << endl; return 0; } $ ./a.out 30 阅读全文
posted @ 2022-07-31 10:58
thomas_blog
阅读(9)
评论(0)
推荐(0)
摘要:
#include <iostream> #include <functional> using namespace std; int main() { negate<int> n; cout << n(10) << endl; return 0; } $ ./a.out -10 阅读全文
posted @ 2022-07-31 10:55
thomas_blog
阅读(23)
评论(0)
推荐(0)
摘要:
#include <iostream> #include <vector> #include <algorithm> using namespace std; class Print { public: void operator()(int i) { cout << i << endl; } }; 阅读全文
posted @ 2022-07-31 10:45
thomas_blog
阅读(41)
评论(0)
推荐(0)
摘要:
#include <iostream> #include <vector> #include <algorithm> using namespace std; class Find { public: bool operator()(int i) { return i < 5; } }; int m 阅读全文
posted @ 2022-07-31 10:28
thomas_blog
阅读(36)
评论(0)
推荐(0)

浙公网安备 33010602011771号