class cluster{ //cluster is basically a tree
int data;
cluster *left;
cluster *right;
}
; }; /cluster 是一棵树,队列是我想要插入集群以进行凝聚集群的内容。我想知道为什么 void add 和 cluster* del 会出错
class queue: public cluster{ //defining queue
cluster *cluster;
queue *next;
public:
void add(cluster*); //this gives error! Why? I ahve a datatype.
cluster* del(cluster*); //so does this
void display();
int size();
}queue;