有关哈夫曼树初始化问题
for(i=1;i<=n;i++) //对叶子节点初始化。{
printf("输入第%d个字符基本信息:",i);
scanf("%c,%d",&HT[i].data,&HT[i].weight); 第4行
HT[i].parent=0; 第5行
HT[i].lchild=0; 第6行
HT[i].rchild=0; 第7行
}
在第4行到第7行依次出现了一下一样的问题,求解答???
error C2228: left of '.data' must have class/struct/union type
error C2228: left of '.weight' must have class/struct/union type
error C2228: left of '.parent' must have class/struct/union type
error C2228: left of '.lchild' must have class/struct/union type
error C2228: left of '.rchild' must have class/struct/union type