Skip to content

Commit bfe2cd8

Browse files
authored
Improve example in C2583 error reference
1 parent 5822cbc commit bfe2cd8

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,16 @@ A [constructor](../../cpp/constructors-cpp.md) or [destructor](../../cpp/destruc
1616

1717
## Example
1818

19-
The following sample generates C2583:
19+
The following example generates C2583:
2020

2121
```cpp
2222
// C2583.cpp
2323
// compile with: /c
24-
class A {
25-
public:
26-
int i;
27-
A() const; // C2583
24+
struct S
25+
{
26+
S() const {} // C2583
2827

29-
// try the following line instead
30-
// A();
28+
// Try the following line instead:
29+
// S() {}
3130
};
3231
```

0 commit comments

Comments
 (0)