Compiler Error C2101
Error Message
'&' on constant
The address-of operator ( & ) must have an l-value as operand.
The following sample generates C2101:
// C2101.cpp
int main() {
char test;
test = &'a'; // C2101
test = 'a'; // OK
}
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
'&' on constant
The address-of operator ( & ) must have an l-value as operand.
The following sample generates C2101:
// C2101.cpp
int main() {
char test;
test = &'a'; // C2101
test = 'a'; // OK
}