摘要: #include <iostream> #include <vector> #include <algorithm> using namespace std; class Print { public: void operator()(int i) { cout << i << endl; } }; 阅读全文
posted @ 2022-07-31 17:18 thomas_blog 阅读(229) 评论(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 17:01 thomas_blog 阅读(39) 评论(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 16:58 thomas_blog 阅读(99) 评论(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 16:46 thomas_blog 阅读(27) 评论(0) 推荐(0)
摘要: #include <iostream> #include <vector> #include <numeric> using namespace std; int main() { vector<int> v; for(int i = 0; i <= 100; i++) { v.push_back( 阅读全文
posted @ 2022-07-31 16:42 thomas_blog 阅读(37) 评论(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 16:30 thomas_blog 阅读(45) 评论(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 16:24 thomas_blog 阅读(47) 评论(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 16:16 thomas_blog 阅读(32) 评论(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 16:13 thomas_blog 阅读(31) 评论(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 16:08 thomas_blog 阅读(36) 评论(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 16:01 thomas_blog 阅读(51) 评论(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 15:49 thomas_blog 阅读(39) 评论(0) 推荐(0)
摘要: #include <iostream> #include <vector> #include <algorithm> using namespace std; class Person { public: Person(string name, int age): name(name), age(a 阅读全文
posted @ 2022-07-31 15:34 thomas_blog 阅读(37) 评论(0) 推荐(0)
摘要: #include <iostream> #include <vector> #include <algorithm> using namespace std; class Person { public: Person(string name, int age): name(name), age(a 阅读全文
posted @ 2022-07-31 13:27 thomas_blog 阅读(56) 评论(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 13:21 thomas_blog 阅读(27) 评论(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 13:09 thomas_blog 阅读(21) 评论(0) 推荐(0)
摘要: #include <iostream> #include <vector> #include <algorithm> using namespace std; class Person { public: Person(string name, int age): name(name), age(a 阅读全文
posted @ 2022-07-31 12:47 thomas_blog 阅读(59) 评论(0) 推荐(0)
摘要: #include <iostream> #include <vector> #include <algorithm> using namespace std; class Person { public: Person(string name, int age): name(name), age(a 阅读全文
posted @ 2022-07-31 12:34 thomas_blog 阅读(40) 评论(0) 推荐(0)
摘要: transform(sourceBeg,sourceEnd,destBeg,op) sourceBeg:源容器开始迭代器 sourceEnd:源容器结束迭代器 destBeg:目标容器开始迭代器 op:函数或者函数对象 #include <iostream> #include <vector> #i 阅读全文
posted @ 2022-07-31 11:56 thomas_blog 阅读(52) 评论(0) 推荐(0)
摘要: #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 阅读(23) 评论(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 阅读(30) 评论(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 阅读(11) 评论(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 阅读(30) 评论(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 阅读(47) 评论(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 阅读(41) 评论(0) 推荐(0)