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

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -