You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/error-messages/compiler-errors-2/compiler-error-c7742.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,13 @@
2
2
description: "Learn more about: Compiler Error C7742"
3
3
title: "Compiler Error C7742"
4
4
ms.date: "07/02/2025"
5
+
ai-usage: ai-assisted
5
6
f1_keywords: ["C7742"]
6
7
helpviewer_keywords: ["C7742"]
7
8
---
8
9
# Compiler Error C7742
9
10
10
-
*identifier*': a forward declaration of an enum can only use a simple identifier
11
+
> *Identifier*: a forward declaration of an enum can only use a simple identifier
11
12
12
13
The C++ Standard doesn't allow declaring an opaque enumeration using a qualified-id. An opaque enum declaration specifies the name and the underlying type, but doesn't list the enumerators or their values.
13
14
@@ -28,7 +29,7 @@ public:
28
29
enum MyClass::MyEnum; // C7742
29
30
```
30
31
31
-
To fix this, remove the opaque enumeration declaration because it doesn't add anything to the program.
32
+
To fix this error, remove the opaque enumeration declaration because it doesn't add anything to the program.
32
33
33
34
However, you can define an enumeration with a qualified-id. For example:
0 commit comments