Skip to content

Commit c784665

Browse files
authored
Add "Remarks" and "Example" headings for error references in range [C2431, C2460]
1 parent 409e8a0 commit c784665

21 files changed

+72
-2
lines changed

docs/error-messages/compiler-errors-1/compiler-error-c2431.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 88a5b648-c89f-47d1-a20e-63231ab4f0f7
1010

1111
> illegal index register in 'identifier'
1212
13+
## Remarks
14+
1315
The ESP register is scaled or used as both index and base register. The SIB encoding for the x86 processor does not allow either.
1416

17+
## Example
18+
1519
The following sample generates C2431:
1620

1721
```cpp

docs/error-messages/compiler-errors-1/compiler-error-c2432.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 0e3326e8-cab1-45a5-b48d-61edd33793e8
1010

1111
> illegal reference to 16-bit data in 'identifier'
1212
13+
## Remarks
14+
1315
A 16-bit register is used as an index or base register. The compiler does not support referencing 16-bit data. 16-bit registers cannot be used as index or base registers when compiling for 32-bit code.
1416

17+
## Example
18+
1519
The following sample generates C2432:
1620

1721
```cpp

docs/error-messages/compiler-errors-1/compiler-error-c2433.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ helpviewer_keywords: ["C2433"]
99

1010
> '*identifier*': '*modifier*' not permitted on data declarations
1111
12+
## Remarks
13+
1214
The **`friend`**, **`virtual`**, and **`inline`** modifiers cannot be used for data declarations.
1315

1416
## Example

docs/error-messages/compiler-errors-1/compiler-error-c2436.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: ca4cc813-bc1d-4c0a-9a2c-3a5fe673d084
1010

1111
> 'identifier' : member function or nested class in constructor initializer list
1212
13+
## Remarks
14+
1315
Member functions or local classes in the constructor initializer list cannot be initialized.
1416

17+
## Example
18+
1519
The following sample generates C2436:
1620

1721
```cpp

docs/error-messages/compiler-errors-1/compiler-error-c2437.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 2d2b3c6c-856a-4b27-ae10-64813b3e5483
1010

1111
> 'identifier' : already initialized
1212
13+
## Remarks
14+
1315
An object can be initialized only once.
1416

17+
## Example
18+
1519
The following sample generates C2437:
1620

1721
```cpp

docs/error-messages/compiler-errors-1/compiler-error-c2438.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 3a0ab3ba-d0e4-4d8f-971d-e503397cc827
1010

1111
> 'identifier' : cannot initialize static class data via constructor
1212
13+
## Remarks
14+
1315
A constructor is used to initialize a static member of a class. Static members must be initialized in a definition outside the class declaration.
1416

17+
## Example
18+
1519
The following sample generates C2438:
1620

1721
```cpp

docs/error-messages/compiler-errors-1/compiler-error-c2439.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 3c5dbe5c-b7d3-4bb0-8619-92f6e280461e
1010

1111
> 'identifier' : member could not be initialized
1212
13+
## Remarks
14+
1315
A class, structure, or union member cannot be initialized.
1416

1517
### To fix by checking the following possible causes

docs/error-messages/compiler-errors-1/compiler-error-c2440.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ no-loc: ["struct", "const"]
1111
> '*initializing*' : cannot convert from '*type1*' to '*type2*'\
1212
> '*conversion*' : cannot convert from '*type1*' to '*type2*'
1313
14-
The compiler can't implicitly convert from *`type1`* to *`type2`*, or can't use the specified cast or conversion operator.
15-
1614
## Remarks
1715

16+
The compiler can't implicitly convert from *`type1`* to *`type2`*, or can't use the specified cast or conversion operator.
17+
1818
The compiler generates C2440 when it can't convert from one type to another, either implicitly or by using the specified cast or conversion operator. There are many ways to generate this error. We've listed some common ones in the Examples section.
1919

2020
## Examples

docs/error-messages/compiler-errors-1/compiler-error-c2443.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 315330d5-24bc-4193-a531-0642095be58f
1010

1111
> operand size conflict
1212
13+
## Remarks
14+
1315
The instruction requires operands to be the same size.
1416

17+
## Example
18+
1519
The following sample generates C2443:
1620

1721
```cpp

docs/error-messages/compiler-errors-1/compiler-error-c2444.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 6339ed82-caad-45d3-a8ff-6c746589fd03
1010

1111
> 'identifier' : used ANSI prototype, found 'type', expected '{' or ';'
1212
13+
## Remarks
14+
1315
The function prototype is followed by a type.
1416

1517
This error can be caused by a missing semicolon or curly brace.

0 commit comments

Comments
 (0)