Skip to content

Commit 9bc3a15

Browse files
authored
Add "Remarks" and "Example" headings in C4172 warning reference
1 parent 24bd1ba commit 9bc3a15

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/error-messages/compiler-warnings/compiler-warning-level-1-c4172.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ ms.assetid: a8d2bf65-d8b1-4fe3-8340-a223d7e7fde6
1010

1111
> returning address of local variable or temporary
1212
13+
## Remarks
14+
1315
A function returns the address of a local variable or temporary object. Local variables and temporary objects are destroyed when a function returns, so the address returned is not valid.
1416

1517
Redesign the function so that it does not return the address of a local object.
1618

19+
## Example
20+
1721
The following sample generates C4172:
1822

1923
```cpp

0 commit comments

Comments
 (0)