Answers for "for_each c++ example std::mao"

C++
0

for_each c++

for_each( InputIt first, InputIt last, UnaryFunction f );
//Example
vector<int> v{ 1, 2, 3, 4, 5 };
for_each(v.begin(), v.end(), [](int i) { cout<<i<<" "<<endl; });
Posted by: Guest on May-10-2021

Browse Popular Code Answers by Language