结构体 的成员包含自身 并对其进行初始化
九点人 2015-04-14 08:57:25 typedef struct STRU_CHANNEL_INFO
{
char chChanName[40]; //通道名称
int iChanIndex; //监控通道号 = 数组索引+startchan
int iPicResolution; //图片分辨率
int iPicQuality; //图片质量
char chAccessChanIP[16]; //ip接入通道的ip地址
BOOL bEnable; //是否有效
NET_DVR_DECODERCFG_V30 struDecodercfg; //通道的解码器信息
STRU_CHANNEL_INFO()
{
chChanName[0] ='\0';
iChanIndex = -1;
iPicResolution = 0;
iPicQuality = 2;
chAccessChanIP[0] = '\0';
bEnable = FALSE;
}
}CHANNEL_INFO,*pCHANNEL_INFO;
我想问问
这里
typedef struct A
{
int a;
A()
{
a=0;
}
} aa,*pa:
这里 在A的定义中包含自身,这是进行初始化,还是什么意思?