cout << "The average number of steps for the stree is " << mystree.aveCompareSteps() << endl; cout << "The average number of steps for the rbtree is " << myrbtree.aveCompareSteps() << endl;
The problem is that it won't compile unless I comment out the second line. I get this error:
d_rbtree.h: In member function `int rbtree<T>::aveCompareSteps() [with T = std::string]': main.cpp:55: instantiated from here d_rbtree.h:1033: error: no matching function for call to `rbtree<std::string>::getLevel(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)' d_rbtree.h:1043: note: candidates are: int rbtree<T>::getLevel(rbnode<T>) [with T = std::string]
The functions are identical as far as I can tell (except for the references to rbtree/stree and rbnode/snode).
Thanks in advance for any guidance...


Sign In
Create Account

Back to top









