Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
'&' requires l-value
The address-of operator (&
) must have an l-value as operand. Address of temporary values cannot be taken.
The following sample generates C2102:
// C2102.cpp
int func()
{
return 1;
}
int main()
{
int* ptr = &func(); // C2102
}