Compiler Error C2186
'operator' : illegal operand of type 'void'
The operator has a void
operand.
The following sample generates C2186:
// C2186.cpp
// compile with: /c
void func1( void );
int func2( void );
int i = 2 + func1(); // C2186 func1() is type void
int j = 2 + func2(); // OK both operands are type int
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for