Compiler Error C2101
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Compiler Error C2101.
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
}
Show: