typedef struct
{
struct
{
int x;
int y;
}Dot[4];
}Elem, *pElem; Elem ElemAry[5] =
{
{ {0,1}, {1,0}, {1,1}, {1,2} },
{ {0,0}, {1,0}, {0,1}, {1,1} },
{ {0,0}, {0,1}, {1,1}, {1,2} },
{ {0,1}, {0,2}, {1,0}, {1,1} },
{ {0,0}, {1,0}, {2,0}, {3,0} }
};
error C2078: too many initializers
为什么
{
struct
{
int x;
int y;
}Dot[4];
}Elem, *pElem; Elem ElemAry[5] =
{
{ {0,1}, {1,0}, {1,1}, {1,2} },
{ {0,0}, {1,0}, {0,1}, {1,1} },
{ {0,0}, {0,1}, {1,1}, {1,2} },
{ {0,1}, {0,2}, {1,0}, {1,1} },
{ {0,0}, {1,0}, {2,0}, {3,0} }
};
error C2078: too many initializers
为什么
{
{ 0,1, 1,0, 1,1, 1,2 },
{ 0,0, 1,0, 0,1, 1,1 },
{ 0,0, 0,1, 1,1, 1,2 },
{ 0,1, 0,2, 1,0, 1,1 },
{ 0,0, 1,0, 2,0, 3,0 }
};