Compiler Error C2232
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 C2232.
left operand has 'class-key' type, use '.'
The operand to the left of the -> operator is not a pointer. Use the period (.) operator for a class, structure, or union.
The following sample generates C2232:
// C2232.c
struct X {
int member;
} x, *px;
int main() {
x->member = 0; // C2232, x is not a pointer
px->member = 0;
x.member = 0;
}
Show: