Skip to content

Commit 06a01ad

Browse files
authored
Add "Remarks" and "Example" headings for error references in range [C2141, C2160]
1 parent 3fe826f commit 06a01ad

20 files changed

+58
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 10cf770f-0500-4220-ac90-a863b7ea5fe6
1010

1111
> array size overflow
1212
13+
## Remarks
14+
1315
An array exceeds the 2GB limit. Reduce the size of the array.
1416

1517
## Example

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: d0dbe10e-0952-49a4-8b33-e82fb7558b19
1010

1111
> function declarations differ, variable parameters specified only in one of them
1212
13+
## Remarks
14+
1315
One declaration of the function contains a variable parameter list. Another declaration does not. ANSI C ([/Za](../../build/reference/za-ze-disable-language-extensions.md)) only.
1416

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

1721
```c

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@ ms.assetid: 1d8d1456-e031-4965-9240-09a6e33ba81c
1010

1111
> syntax error : missing 'token1' before 'token2'
1212
13+
## Remarks
14+
1315
The compiler expected a specific token (that is, a language element other than white space) and found another token instead.
1416

1517
Check the [C++ Language Reference](../../cpp/cpp-language-reference.md) to determine where code is syntactically incorrect. Because the compiler may report this error after it encounters the line that causes the problem, check several lines of code that precede the error.
1618

1719
C2143 can occur in different situations.
1820

21+
## Examples
22+
1923
It can occur when an operator that can qualify a name (`::`, `->`, and `.`) must be followed by the keyword **`template`**, as in this example:
2024

2125
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 49f3959b-324f-4c06-9588-c0ecef5dc5b3
1010

1111
> syntax error : '*type*' should be preceded by '*token*'
1212
13+
## Remarks
14+
1315
The compiler expected *token* and found *type* instead.
1416

1517
This error may be caused by a missing closing brace, right parenthesis, or semicolon.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 158e5809-8adb-4195-8ca5-684501defbc8
1010

1111
> syntax error : missing 'token' before identifier
1212
13+
## Remarks
14+
1315
The compiler expected `token` and found identifier instead.
1416

1517
This error may be caused by a missing semicolon after the last declaration in a block.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 6bfb7de6-6723-4486-9350-c66ef88d7a64
1010

1111
> syntax error : missing 'token' before identifier 'identifier'
1212
13+
## Remarks
14+
1315
The compiler expected `token` and found `identifier` instead. Possible causes:
1416

1517
1. Spelling or capitalization error.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: d1adb3bf-7ece-4815-922c-ad7492fb6670
1010

1111
> syntax error : 'identifier' is a new keyword
1212
13+
## Remarks
14+
1315
An identifier was used that is now a reserved keyword in the language.
1416

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

1721
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: e510c2c9-7b57-4ce8-be03-ba363e2cc5d9
1010

1111
> total size of array must not exceed 0x7fffffff bytes
1212
13+
## Remarks
14+
1315
An array exceeds the limit. Reduce the size of the array.
1416

1517
## Example

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ ms.assetid: 7a106dab-d79f-41b9-85be-f36e86e4d2ab
1010

1111
> 'identifier' : named bit field cannot have zero width
1212
13+
## Remarks
14+
1315
Bit fields can have zero width only if unnamed.
1416

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

1721
```cpp

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ ms.assetid: 21e82a10-c1d4-4c0d-9dc6-c5d92ea42a31
1010

1111
> '*identifier*' : bit field must have type 'int', 'signed int', or 'unsigned int'
1212
13+
## Remarks
14+
1315
The base type for a bit-field is required to be **`int`**, **`signed int`**, or **`unsigned int`**.
1416

1517
## Example

0 commit comments

Comments
 (0)