samedi 10 janvier 2015

C++ cannot specify explicit initializer for arrays


Vote count:

0




Why does this compile in VS 2013



int main()
{

int a[3] = { 1, 2, 3 };

return 0;

}


but this gives the error



class TestClass
{

int a[3] = { 1, 2, 3 };

};


How do I fix it?



asked 7 secs ago







C++ cannot specify explicit initializer for arrays

Aucun commentaire:

Enregistrer un commentaire