2

I'm quite confused why the below code doesn't get compiled. The compiler will be happy if I explicitly specify the array size, but why's that necessary here?

struct A
{
    struct {int i; int j;} deltas[] {{0, -1}, {0, 1}, {-1, 0}, {1, 0}};

    A()
    {
    }
};

int main()
{
}

0 Answers0