Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4
You can use a fold expression with the comma operator to apply a function to all values of a parameter pack: https://code.sololearn.com/c6u5nPOoE96Q/?ref=app
6th Oct 2021, 12:13 AM
Shadow
Shadow - avatar
+ 1
Or you can use a range based for loop and access the elements, like: for(auto i:b) { a.push_back(i); }
6th Oct 2021, 1:45 AM
Rishi
Rishi - avatar