diff --git a/docs/error-messages/compiler-errors-1/compiler-error-c2033.md b/docs/error-messages/compiler-errors-1/compiler-error-c2033.md index 87aaa08b7b..3af050bc1e 100644 --- a/docs/error-messages/compiler-errors-1/compiler-error-c2033.md +++ b/docs/error-messages/compiler-errors-1/compiler-error-c2033.md @@ -1,17 +1,17 @@ --- title: "Compiler Error C2033" description: "Learn more about: Compiler Error C2033" -ms.date: 11/04/2016 +ms.date: 09/10/2025 f1_keywords: ["C2033"] helpviewer_keywords: ["C2033"] --- # Compiler Error C2033 -> 'identifier' : bit field cannot have indirection +> '*identifier*': bit field cannot have indirection ## Remarks -The bit field was declared as a pointer, which is not allowed. +Bit fields can't be declared as a pointer, reference, or array. For more information, see [C++ Bit Fields](../../cpp/cpp-bit-fields.md). ## Example @@ -19,17 +19,16 @@ The following example generates C2033: ```cpp // C2033.cpp -struct S { - int *b : 1; // C2033 +// compile with: /c + +struct S +{ + int* ptr : 1; // C2033 + int& ref : 1; // C2033 + int arr[3] : 1; // C2033 }; ``` -Possible resolution: +## See also -```cpp -// C2033b.cpp -// compile with: /c -struct S { - int b : 1; -}; -``` +[Compiler Error C2531](../compiler-errors-2/compiler-error-c2531.md)