error: no matching function for call to ‘BSTreeNode<int, int>::BSTreeNode(int, int, NULL, NULL)’ - what's wrong?

Posted by Alexander Suraphel on Stack Overflow See other posts from Stack Overflow or by Alexander Suraphel
Published on 2010-12-25T06:25:53Z Indexed on 2010/12/25 6:54 UTC
Read the original article Hit count: 559

Filed under:
|
|

error: no matching function for call to ‘BSTreeNode::BSTreeNode(int, int, NULL, NULL)’

candidates are: BSTreeNode::BSTreeNode(KF, DT&, BSTreeNode*, BSTreeNode*) [with KF = int, DT = int]

here is how I used it:

BSTreeNode<int, int> newNode(5,9, NULL, NULL) ;

I defined it as follows:

BSTreeNode(KF sKey, DT &data, BSTreeNode *lt, BSTreeNode *rt):key(sKey),dataItem(data), left(lt), right(rt){}

what's wrong with using my constructor this way?

i've been pulling out my hair all night please help me ASAP!!

© Stack Overflow or respective owner

Related posts about c++

Related posts about templates