Compiler Error C2100
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 C2100.
illegal indirection
Indirection operator ( * ) is applied to a nonpointer value.
The following sample generates C2100:
// C2100.cpp
int main() {
int r = 0, *s = 0;
s = &r;
*r = 200; // C2100
*s = 200; // OK
}
Show: