Export (0) Print
Expand All
Expand Minimize

Compiler Error C2078

too many initializers

The number of initializers exceeds the number of objects to be initialized.

The following sample generates C2078:

// C2078.cpp
int main() {
   int d[2] = {1, 2, 3};   // C2078
   int e[2] = {1, 2};   // OK

   char a[]={"a", "b"};   // C2078
   char *b[]={"a", "b"};   // OK
   char c[]={'a', 'b'};   // OK
}

Community Additions

ADD
Show:
© 2014 Microsoft