struct中初始化中的一個大錯誤

If I have defined the struct as follows :ui

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////this

typedef struct  MyParam : public CommonParam
{
 float Image[1024];
int ImageType;spa

     MyParam()element

          {it

                Image[1024]={0.0,0.0};io

                ImageType=10;sed

          }
};
float

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////error

When I build it ,there are some errors ;di

The reason is that :I confuse the initialization between  declaring  initialization and the struct initiazation ;Here ,we can't  initialize the array Image[1024] by this way ;we are supposed to give evey value for the each element of the array ! That's just my error ;


相關文章
相關標籤/搜索