自创测试小技巧之vector的显示
//#define showVector(T) for_each(T.begin(),T.end(),[](int i){cout<<i<<" ";});cout<<endl
#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>
#include <type_traits>
#include <memory>using namespace std;
#define showVector(T) for_each(T.
begin(),T.end(),[](int i){cout<<i<<" ";});
cout<<endlint main(){ vector<int> one(10);
vector<int> two(10);
for_each(one.begin(),one.end(),[](int& x){ x = 3;});
showVector(one);
uninitialized_copy(one.begin(),one.end(),two.begin());
showVector(two);
return 1;}
补充:综合编程 , 其他综合 ,