64,691
社区成员
发帖
与我相关
我的任务
分享
#include <stdio.h>
#include <vector>
using namespace std;
struct HuffmanNode{
int weight;
int isLeaf;
struct HuffmanNode *parent;
bool isUsed;
};
typedef struct HuffmanNode HNode;
vector<HNode*> myQueue;
int main(){
;
int weight=0;
for(int i=0;i<5;i++){
HNode *hNode;
hNode->weight=weight;
hNode->isLeaf=true;
hNode->isUsed=false;
hNode->parent=NULL;
myQueue.push_back(hNode);
}
printf("queue size:%d\n",myQueue.size());
return 0;
}