Skip to content

Commit 135ca5a

Browse files
authored
Merge pull request #5700 from Rageking8/structure-error-references-in-range-c3801-c3850
Structure error references in range [C3801, C3850]
2 parents d28f8f8 + 067be4c commit 135ca5a

30 files changed

+182
-140
lines changed

docs/error-messages/compiler-errors-2/compiler-error-c3803.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C3803"
32
title: "Compiler Error C3803"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3803"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3803"]
66
helpviewer_keywords: ["C3803"]
7-
ms.assetid: bad5fb9a-ed9a-4c15-96e7-cf06e200a50d
87
---
98
# Compiler Error C3803
109

11-
'property': property has a type that is incompatible with one of its accessors 'accessor'
10+
> 'property': property has a type that is incompatible with one of its accessors 'accessor'
11+
12+
## Remarks
1213

1314
The type of a property defined with [property](../../cpp/property-cpp.md) does not match the return type for one of its accessor functions.
1415

15-
The following sample generates C3803:
16+
## Example
17+
18+
The following example generates C3803:
1619

1720
```cpp
1821
// C3803.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3804.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
---
2-
description: "Learn more about: Compiler Error C3804"
32
title: "Compiler Error C3804"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3804"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3804"]
66
helpviewer_keywords: ["C3804"]
7-
ms.assetid: 7c4cda28-ec96-4d04-937b-36dbd9944722
87
---
98
# Compiler Error C3804
109

11-
'property_accessor': the accessor methods for a property must either be all static or all non-static
10+
> 'property_accessor': the accessor methods for a property must either be all static or all non-static
11+
12+
## Remarks
1213

1314
When defining a non-trivial property, the accessor functions can be either static or instance, but not both.
1415

1516
See [property](../../extensions/property-cpp-component-extensions.md) for more information.
1617

1718
## Example
1819

19-
The following sample generates C3804.
20+
The following example generates C3804.
2021

2122
```cpp
2223
// C3804.cpp
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
2-
description: "Learn more about: Compiler Error C3805"
32
title: "Compiler Error C3805"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3805"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3805"]
66
helpviewer_keywords: ["C3805"]
7-
ms.assetid: 166bbc35-5488-46b4-8e4c-9cd26ee5644e
87
---
98
# Compiler Error C3805
109

11-
'token' : unexpected token, expected either '}' or an identifier
10+
> 'token' : unexpected token, expected either '}' or an identifier
11+
12+
## Remarks
1213

1314
When defining a property, an invalid token was encountered. Remove the invalid token.

docs/error-messages/compiler-errors-2/compiler-error-c3807.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C3807"
32
title: "Compiler Error C3807"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3807"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3807"]
66
helpviewer_keywords: ["C3807"]
7-
ms.assetid: 7e2b0aab-8c61-4e71-b9c1-fcaeb6a1b5ea
87
---
98
# Compiler Error C3807
109

11-
'type' : a class with the ComImport attribute cannot derive from 'type2', only interface implementation is allowed
10+
> 'type' : a class with the ComImport attribute cannot derive from 'type2', only interface implementation is allowed
11+
12+
## Remarks
1213

1314
A type that derived from <xref:System.Runtime.InteropServices.ComImportAttribute> can only implement an interface.
1415

1516
## Example
1617

17-
The following sample generates C3807.
18+
The following example generates C3807.
1819

1920
```cpp
2021
// C3807.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3808.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
description: "Learn more about: Compiler Error C3808"
32
title: "Compiler Error C3808"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3808"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3808"]
66
helpviewer_keywords: ["C3808"]
7-
ms.assetid: 2ee8ac97-3ea4-417a-8710-be73a7f98cf4
87
---
98
# Compiler Error C3808
109

@@ -18,7 +17,7 @@ The **/clr:pure** and **/clr:safe** compiler options are deprecated in Visual St
1817

1918
## Example
2019

21-
The following sample generates C3808.
20+
The following example generates C3808.
2221

2322
```cpp
2423
// C3808.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3809.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C3809"
32
title: "Compiler Error C3809"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3809"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3809"]
66
helpviewer_keywords: ["C3809"]
7-
ms.assetid: 37eca584-c20c-464e-8e45-a987214b7ce4
87
---
98
# Compiler Error C3809
109

11-
'class' : a managed or WinRT type cannot have any friend functions/classes/interfaces
10+
> 'class' : a managed or WinRT type cannot have any friend functions/classes/interfaces
11+
12+
## Remarks
1213

1314
Managed types and Windows Runtime types do not allow friends. To fix this error, do not declare friends inside managed or Windows Runtime types.
1415

15-
The following sample generates C3809:
16+
## Example
17+
18+
The following example generates C3809:
1619

1720
```cpp
1821
// C3809a.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3812.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
2-
description: "Learn more about: Compiler Error C3812"
32
title: "Compiler Error C3812"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3812"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3812"]
66
helpviewer_keywords: ["C3812"]
7-
ms.assetid: 326ac706-9a5f-4851-b9d2-b90c64c75532
87
---
98
# Compiler Error C3812
109

11-
'property' must be the first token in a property declaration
10+
> 'property' must be the first token in a property declaration
11+
12+
## Remarks
1213

1314
When declaring a property, the `__property` keyword must be the first token on the line.
1415

docs/error-messages/compiler-errors-2/compiler-error-c3813.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C3813"
32
title: "Compiler Error C3813"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3813"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3813"]
66
helpviewer_keywords: ["C3813"]
7-
ms.assetid: ffdbc489-71bf-4cd6-988c-f824c9ab3ceb
87
---
98
# Compiler Error C3813
109

11-
a property declaration can only appear within the definition of a managed or WinRT type
10+
> a property declaration can only appear within the definition of a managed or WinRT type
11+
12+
## Remarks
1213

1314
A [property](../../dotnet/how-to-use-properties-in-cpp-cli.md) can only be declared within a managed or Windows Runtime type. Native types do not support the **`property`** keyword.
1415

1516
## Example
1617

17-
The following sample generates C3813 and shows how to fix it:
18+
The following example generates C3813 and shows how to fix it:
1819

1920
```cpp
2021
// C3813.cpp

docs/error-messages/compiler-errors-2/compiler-error-c3815.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
2-
description: "Learn more about: Compiler Error C3815"
32
title: "Compiler Error C3815"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3815"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3815"]
66
helpviewer_keywords: ["C3815"]
7-
ms.assetid: c5a3b404-6341-4fd3-92af-152b404c4dde
87
---
98
# Compiler Error C3815
109

11-
return type of method 'get_accessor' must match type of the last parameter of a setter
10+
> return type of method 'get_accessor' must match type of the last parameter of a setter
11+
12+
## Remarks
1213

1314
When declaring properties, the return value of the `get_accessor` method must match the last parameter in the declaration of the set accessor method.
1415

docs/error-messages/compiler-errors-2/compiler-error-c3816.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
2-
description: "Learn more about: Compiler Error C3816"
32
title: "Compiler Error C3816"
4-
ms.date: "11/04/2016"
3+
description: "Learn more about: Compiler Error C3816"
4+
ms.date: 11/04/2016
55
f1_keywords: ["C3816"]
66
helpviewer_keywords: ["C3816"]
7-
ms.assetid: 2e52cc7f-e31c-41a3-8d6f-9f5fab3648c0
87
---
98
# Compiler Error C3816
109

11-
'declaration' was previously declared or defined with a different managed or WinRTmodifier
10+
> 'declaration' was previously declared or defined with a different managed or WinRTmodifier
11+
12+
## Remarks
1213

1314
A forward declaration and an actual declaration require that there be no conflicts or inconsistencies in the declaration of attributes.
1415

15-
The following sample generates C3816 and shows how to fix it:
16+
## Example
17+
18+
The following example generates C3816 and shows how to fix it:
1619

1720
```cpp
1821
// C3816a.cpp

0 commit comments

Comments
 (0)