很简单一个问题,为什么这两个地方用的定义类型不一样呢?
typedef struct Node
{
int weight;
int parent,LChild,RChild;
}HTNode,* HTree;
typedef char * HuffmanCode;
void CreatHTree(HTree ht,HuffmanCode hc,int * w,int n)
{
int start,i,m;
m=2*n-1;
ht=(HTree)malloc((m+1)* sizeof(HTNode));
为什么结构体定义的是指针,然后后面HTree呢?