From b963f1d07c0305fc9dd4922dd6219af7c70eaf40 Mon Sep 17 00:00:00 2001 From: TylerMSFT Date: Fri, 22 Aug 2025 14:18:27 -0700 Subject: [PATCH] fix typos and remove bad example --- .../compiler-errors-1/compiler-error-c2274.md | 28 ++++--------------- .../compiler-errors-1/compiler-error-c2289.md | 13 +++++---- 2 files changed, 14 insertions(+), 27 deletions(-) diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2274.md b/docs/error-messages/compiler-errors-1/compiler-error-c2274.md index 52cd5d4fca..1724a0006e 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2274.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2274.md @@ -1,32 +1,16 @@ --- -description: "Learn more about: Compiler Error C2274" title: "Compiler Error C2274" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2274" +ms.date: 11/04/2016 f1_keywords: ["C2274"] helpviewer_keywords: ["C2274"] -ms.assetid: 8e874903-f499-45ef-8291-f821eee4cc1c --- # Compiler Error C2274 -'type' : illegal as right side of '.' operator - -A type appears as the right operand of a member-access (.) operator. - -This error can be caused by trying to access a user-defined type conversion. Use the keyword **`operator`** between the period and `type`. +> 'type' : illegal as right side of '.' operator -The following sample generates C2286: +## Remarks -```cpp -// C2274.cpp -struct MyClass { - operator int() { - return 0; - } -}; +A type appears as the right operand of a member-access (.) operator. -int main() { - MyClass ClassName; - int i = ClassName.int(); // C2274 - int j = ClassName.operator int(); // OK -} -``` +This error can be caused by trying to access a user-defined type conversion. Use the keyword **`operator`** between the period and `type`. \ No newline at end of file diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2289.md b/docs/error-messages/compiler-errors-1/compiler-error-c2289.md index 485af60194..25fe25f0f2 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2289.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2289.md @@ -1,18 +1,21 @@ --- -description: "Learn more about: Compiler Error C2289" title: "Compiler Error C2289" -ms.date: "11/04/2016" +description: "Learn more about: Compiler Error C2289" +ms.date: 11/04/2016 f1_keywords: ["C2289"] helpviewer_keywords: ["C2289"] -ms.assetid: cb41a29e-1b06-47dc-bfce-8d73bd63a0df --- # Compiler Error C2289 -same type qualifier used more than once +> same type qualifier used more than once + +## Remarks A type declaration or definition uses a type qualifier (**`const`**, **`volatile`**, **`signed`**, or **`unsigned`**) more than once, causing an error under ANSI compatibility (**/Za**). -The following sample generates C2286: +## Example + +The following example generates C2289: ```cpp // C2289.cpp