Compiler Error C2034
'identifier' : type of bit field too small for number of bits
The number of bits in the bit-field declaration exceeds the size of the base type.
The following sample generates C2034:
// C2034.cpp
struct A {
char test : 9; // C2034, char has 8 bits
};
Possible resolution:
// C2034b.cpp
// compile with: /c
struct A {
char test : 8;
};
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for