c++ for_each
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main()
{
vector<int> v1;
for(int i=0;i<10;++i)
{
v1.push_back(i);
}
for_each(v1.begin(),v1.end() ,[](int i)->void{ cout << i <<" "; });
cout<<endl;
system("pause");
return 0;
}
QQ 3087438119