Lambda functions

Error: candidates expects 2 arguments, 1 provided;
The first argument is saved or not?
Need something not declare an argument?

1
2
3
4
5
auto sum=[](int, int b) -> int 
{
    return (8 + b);
};
cout << sum(5) << endl;
Last edited on
first argument needs to be passed though it will be unused in the lambda itself
Topic archived. No new replies allowed.