Skip to content

Commit 242396c

Browse files
authored
Overhaul example in C2574 error reference
1 parent 84b28f6 commit 242396c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@ Neither destructors nor constructors can be declared **`static`**.
1616

1717
## Example
1818

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

2121
```cpp
2222
// C2574.cpp
2323
// compile with: /c
24-
class A {
25-
virtual static ~A(); // C2574
26-
// try the following line instead
27-
// virtual ~A();
24+
struct S
25+
{
26+
static S() {} // C2574
27+
28+
// Try the following line instead:
29+
// S() {}
2830
};
2931
```

0 commit comments

Comments
 (0)