Too many initializers for array in C++ -



Too many initializers for array in C++ -

i trying initialize array in visual c++.

in header file, declaring array this. int pawnsquaretable[64];

in cpp file include header file, initializing array in constructor of class in manner:

pawnsquaretable[64]={0,0,1,2.....64 values};

however, vc++ giving me too many initializer valueserror. why happening?

edit: reddish squiggly line underlines sec element of array.

a::a() // : pawnsquaretable{1,2,3,4} // compile in clang/gcc { // msvc, instead int* p = pawnsquaretable; for( int : {1,2,3,4} ) // <- values here *p++=i; }

c++ arrays

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -