Compiler Error C2104
'&' on bit field ignored
You cannot take the address of a bit field.
The following sample generates C2104:
// C2104.cpp
struct X {
int sb : 1;
};
int main() {
X x;
&x.sb; // C2104
x.sb; // OK
}
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
'&' on bit field ignored
You cannot take the address of a bit field.
The following sample generates C2104:
// C2104.cpp
struct X {
int sb : 1;
};
int main() {
X x;
&x.sb; // C2104
x.sb; // OK
}