Compiler Error C2233

 

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 C2233.

identifier' : arrays of objects containing zero-size arrays are illegal

Each object in an array must contain at least one element.

The following sample generates C2233:

// C2233.cpp  
// compile with: /c  
class A {  
   char somearray[1];  
};  
  
class B {  
   char zeroarray[];  
};  
  
A array[100];   // OK  
B array2[100];   // C2233  

Show: