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
+ 1
Or you can use a range based for loop and access the elements, like:
for(auto i:b)
{
a.push_back(i);
}