Skip to content

Commit 1899e44

Browse files
TylerMSFTTylerMSFT
authored andcommitted
fix github issue - code example wrong
1 parent 3b64238 commit 1899e44

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

docs/cpp/examples-of-lambda-expressions.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ description: "Learn more about: Examples of Lambda Expressions"
33
title: "Examples of Lambda Expressions"
44
ms.date: "05/07/2019"
55
helpviewer_keywords: ["lambda expressions [C++], examples"]
6-
ms.assetid: 52506b15-0771-4190-a966-2f302049ca86
76
---
87
# Examples of Lambda Expressions
98

@@ -424,7 +423,7 @@ int main()
424423
// Create another vector that contains index values.
425424
vector<int> indices(3);
426425
indices[0] = 0;
427-
indices[1] = -1; // This is not a valid subscript. It will trigger an exception.
426+
indices[-1] = 1; // This is not a valid subscript. It will trigger an exception.
428427
indices[2] = 2;
429428

430429
// Use the values from the vector of index values to

0 commit comments

Comments
 (0)