Skip to content

Commit fc7b294

Browse files
committed
formatting
1 parent 804e4e0 commit fc7b294

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

docs/error-messages/compiler-errors-1/compiler-error-c2462.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ title: "Compiler Error C2462"
44
ms.date: "11/04/2016"
55
f1_keywords: ["C2462"]
66
helpviewer_keywords: ["C2462"]
7-
ms.assetid: a8601bf8-f5ce-41de-9117-e2632bd4996b
87
---
98
# Compiler Error C2462
109

11-
'identifier' : cannot define a type in a 'new-expression'
10+
> 'identifier' : cannot define a type in a 'new-expression'
1211
1312
You cannot define a type in the operand field of the **`new`** operator. Put the type definition in a separate statement.
1413

1514
The following sample generates C2462:
1615

1716
```cpp
1817
// C2462.cpp
19-
int main() {
18+
int main()
19+
{
2020
new struct S { int i; }; // C2462
2121
}
2222
```

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
description: "Learn more about: Compiler Error C7742"
33
title: "Compiler Error C7742"
44
ms.date: "07/02/2025"
5+
ai-usage: ai-assisted
56
f1_keywords: ["C7742"]
67
helpviewer_keywords: ["C7742"]
78
---
89
# Compiler Error C7742
910

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
1112
1213
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.
1314

@@ -28,7 +29,7 @@ public:
2829
enum MyClass::MyEnum; // C7742
2930
```
3031

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

3334
However, you can define an enumeration with a qualified-id. For example:
3435

0 commit comments

Comments
 (0)