Skip to content

Commit f4f370d

Browse files
authored
Add leading example sentence for warning references in range [C4231, C4270]
1 parent 21a2745 commit f4f370d

File tree

6 files changed

+12
-0
lines changed

6 files changed

+12
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ Think carefully about adding `__declspec(dllexport)` or `__declspec(dllimport)`
3232

3333
## Example
3434

35+
The following example generates C4251:
36+
3537
```cpp
3638
// C4251.cpp
3739
// Compile with /std:c++20 /EHsc /W2 /c C4251.cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ A **`const`** automatic instance of a non-trivial class is initialized with a co
1515

1616
## Example
1717

18+
The following example generates C4269:
19+
1820
```cpp
1921
// C4269.cpp
2022
// compile with: /c /LD /W1

docs/error-messages/compiler-warnings/compiler-warning-level-2-c4250.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Because a virtual base class is shared among multiple derived classes, a name in
1919

2020
## Examples
2121

22+
The following example generates C4250:
23+
2224
```cpp
2325
// C4250.cpp
2426
// compile with: /c /W2

docs/error-messages/compiler-warnings/compiler-warning-level-3-c4240.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Under ANSI compatibility ([/Za](../../build/reference/za-ze-disable-language-ext
1515

1616
## Example
1717

18+
The following example generates C4240:
19+
1820
```cpp
1921
// C4240.cpp
2022
// compile with: /W3

docs/error-messages/compiler-warnings/compiler-warning-level-4-c4238.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ For compatibility with previous versions of Visual C++, Microsoft extensions (**
1515

1616
## Example
1717

18+
The following example generates C4238:
19+
1820
```cpp
1921
// C4238.cpp
2022
// compile with: /W4 /c

docs/error-messages/compiler-warnings/compiler-warning-level-4-c4268.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ A **`const`** global or static instance of a non-trivial class is initialized wi
1515

1616
## Example
1717

18+
The following example generates C4268:
19+
1820
```cpp
1921
// C4268.cpp
2022
// compile with: /c /LD /W4

0 commit comments

Comments
 (0)