My best guess is it has to do with the passes the compiler is making. In the first pass the structure is initialized, this means it's size MUST be assigned at this time, so if forces the array to size [0]. Then on a later pass when it does assignment it can't store into the size [0] array and it fails to compile. Try giving a size and this should be a good alternative:
#include <iostream>
using namespace std;
struct myStruct{
char myArray[4] = {'1','2','3','\0'};
};
int main()
{
myStruct Mystructure;
cout<<Mystructure.myArray;
return 0;
}
Another solution would be to do it in the base member initialization list for the constructor(which would be required in this case), but I'm not sure how to do that with an array. I would think it would work though as it seems to be a similar reason to why you can't initialize constants if I had to guess.