Compiler Error C2088

 

For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.

For the latest documentation on Visual Studio 2017, see Compiler Error C2088 on docs.microsoft.com. 'operator' : illegal for 'class-key'

The operator was not defined for the structure or union. This error is only valid for C code.

The following sample generates C2088 three times:

// C2088.c  
struct S {  
   int m_i;   
} s;  
  
int main() {  
   int i = s * 1;   // C2088  
   struct S s2 = +s;   // C2088  
   s++;   // C2088  
}  

Show: