Darren New <dne### [at] sanrrcom> wrote:
> What's the type of
> [&](int x) { total += x; }
> What kind of variable can I assign that to?
You don't have to know the type (and in fact, the type is unspecified).
You create a variable like this:
auto myLambdaFunc = [&](int x) { total += x; };
--
- Warp
Post a reply to this message
|