well the error i get is the title above:
error C2664: 'searchTree' : cannot convert parameter 2 from 'const char *' to 'char'
error is form this line
i have also attached searchTree below for yr reference
could anyone help me with this problem..?
well at first i get the problem that it can convert from char to string.. thats y i added the .c_str() but now it gives me the new error above..
any help is appreciated..
I will check forum every 5 mins .. so i will reply quick..
Thanks in advance :)
error C2664: 'searchTree' : cannot convert parameter 2 from 'const char *' to 'char'
error is form this line
Code:
searchTree(treeObj->root ,data1.c_str());
Code:
Tree<char> *treeObj = NULL; TreeNode<char> *treeNodeObj = NULL; TreeNode<char>* searchTree(TreeNode<char> *cur, char nodeToAdd) { if(cur == NULL) { return NULL; } if(cur->IsSameNode(nodeToAdd)) { return cur; } searchTree(cur->getLeft(), nodeToAdd); searchTree(cur->getRight(), nodeToAdd); }
could anyone help me with this problem..?
well at first i get the problem that it can convert from char to string.. thats y i added the .c_str() but now it gives me the new error above..
any help is appreciated..
I will check forum every 5 mins .. so i will reply quick..
Thanks in advance :)
Comment