Skip to content

Commit 2c83374

Browse files
authored
Update lambda-expressions-in-cpp.md
1 parent d3871ee commit 2c83374

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/cpp/lambda-expressions-in-cpp.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ pNums = make_unique<vector<int>>(nums);
149149
In addition to capturing variables, a lambda can accept input parameters. A parameter list (*lambda declarator* in the Standard syntax) is optional and in most aspects resembles the parameter list for a function.
150150
151151
```cpp
152-
int y = [] (int first, int second)
152+
auto y = [] (int first, int second)
153153
{
154154
return first + second;
155155
};
@@ -390,4 +390,4 @@ auto Sqr = [](int t) __declspec(code_seg("PagedMem")) -> int { return t*t; };
390390
[C++ Language Reference](../cpp/cpp-language-reference.md)
391391
[Function Objects in the C++ Standard Library](../standard-library/function-objects-in-the-stl.md)
392392
[Function Call](../cpp/function-call-cpp.md)
393-
[for_each](../standard-library/algorithm-functions.md#for_each)
393+
[for_each](../standard-library/algorithm-functions.md#for_each)

0 commit comments

Comments
 (0)