Hi team,
Here is the code:
Can I please have a name for this so I can google it and find out more about it?? thanks team!!
Here is the code:
Code:
struct Sum
{
int sum;
Sum() : sum(0) { } // <<== what is this???
void operator()(int n) { sum += n; }
};
Sum s = std::for_each(v.begin(), v.end(), Sum());
Code:
Sum() : sum(0) { } // <<== what is this???
