- 论坛徽章:
- 0
|
下面这个头文件,用VS2003.net和VC6编译,都在注释了 // Error Here 的那一行提示
语法错误 : 缺少“;”(在“<”的前面)
请高手帮忙指点一下问题出在哪里!谢谢!
#ifndef HFMTREE_H_
#define HFMTREE_H_
#include <iostream>
#include <deque>
#include <vector>
class HfmTree
{
public:
enum henum_
{
MaxTextLen_ = 8,
MaxWeight_ = 0xffff
};
explicit HfmTree();
explicit HfmTree(
const int leaf = 0,
const char textArr[][MaxTextLen_] = NULL,
const int weightArr[] = NULL);
virtual ~HfmTree();
private:
class HfmNode
{
public:
HfmNode()
:weight_(0)
,parent_(-1)
,lchild_(-1)
,rchild_(-1)
,used_(false)
{}
private:
int weight_;
int parent_;
int lchild_;
int rchild_;
bool used_;
};
typedef vector <HfmNode> Node; // Error Here
typedef vector <pair<char *, char *> > CodeData;
CodeData code_;
Node node_;
int leaf_;
int head_;
};
#endif
[ 本帖最后由 wisher1999 于 2007-2-3 19:49 编辑 ] |
|