当然可以初始化
Int型可直接初始化 ,例如:NAME_SCORE.course_score=0;即可
NAME_SCORE sta;
memset(&sta, 0, sizeof(NAME_SCORE));
这样就初始化成0了
NAME_SCORE name_source;
void Init(void *p_data,unsigned int size)
{
unsigned char *p = p_data;
unsigned char i = 0;
for(;i < size;i++)
*(p+i) = 0;
}
Init(&name_source,sizeof(name_source));