标签:io ar os sp for on bs ef as
If I have defined the struct as follows :
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
typedef struct MyParam : public CommonParam
{
float Image[1024];
int ImageType;
MyParam()
{
Image[1024]={0.0,0.0};
ImageType=10;
}
};
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
When I build it ,there are some errors ;
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 ;
标签:io ar os sp for on bs ef as
原文地址:http://www.cnblogs.com/yuyanbian/p/4088623.html