我正在研究c++,2-3树中的数据结构.
我想知道‘:MAXKEY(),root()’。
class Two3 {
public:
Two3(KeyType max, Two3Node<KeyType>* init = 0)
: MAXKEY(max), root(init) {}; //constructor
Boolean function(…);
private:
Two3Node<KeyType>* root;
KeyType MAXKEY;这是我想知道的。
:MAXKEY(max),根(Init) {};//构造函数
发布于 2015-10-15 15:39:20
这是一个初始化列表。它说“用max初始化MAXKEY,用init初始化root”。初始化器在将控件传递到构造函数主体之前运行。
https://stackoverflow.com/questions/33152717
复制相似问题