Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions docs/error-messages/compiler-errors-1/compiler-error-c2274.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,4 @@ helpviewer_keywords: ["C2274"]

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`.

## Example

The following example generates C2286:

```cpp
// C2274.cpp
struct MyClass {
operator int() {
return 0;
}
};

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`.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A type declaration or definition uses a type qualifier (**`const`**, **`volatile

## Example

The following example generates C2286:
The following example generates C2289:

```cpp
// C2289.cpp
Expand Down