Skip to content

Commit 3bff02d

Browse files
authored
Merge pull request #5763 from Rageking8/augment-c2033-error-reference
Augment C2033 error reference
2 parents 72f3d7e + 5dd06e8 commit 3bff02d

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed
Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,33 @@
11
---
22
title: "Compiler Error C2033"
33
description: "Learn more about: Compiler Error C2033"
4-
ms.date: 11/04/2016
4+
ms.date: 09/10/2025
55
f1_keywords: ["C2033"]
66
helpviewer_keywords: ["C2033"]
77
---
88
# Compiler Error C2033
99

10-
> 'identifier' : bit field cannot have indirection
10+
> '*identifier*': bit field cannot have indirection
1111
1212
## Remarks
1313

14-
The bit field was declared as a pointer, which is not allowed.
14+
Bit fields can't be declared as a pointer, reference, or array. For more information, see [C++ Bit Fields](../../cpp/cpp-bit-fields.md).
1515

1616
## Example
1717

1818
The following example generates C2033:
1919

2020
```cpp
2121
// C2033.cpp
22-
struct S {
23-
int *b : 1; // C2033
22+
// compile with: /c
23+
24+
struct S
25+
{
26+
int* ptr : 1; // C2033
27+
int arr[3] : 1; // C2033
2428
};
2529
```
2630

27-
Possible resolution:
31+
## See also
2832

29-
```cpp
30-
// C2033b.cpp
31-
// compile with: /c
32-
struct S {
33-
int b : 1;
34-
};
35-
```
33+
[Compiler Error C2531](../compiler-errors-2/compiler-error-c2531.md)

0 commit comments

Comments
 (0)