I have a situation where I am not allowed to modify the header file for my class. I want to add just a helper function to use with one of my functions.. but cant quite figure out the correct way to implement it. Normally I try google but couldn't find any help on there.
Here is my current code:
template<typename T>
void Set<T>::doubleRotateRight(Elem *& node) {
// you fill in here
rotateRight(node->left);
rotateLeft(node);
//call private helper not defined in header
privmed();
}
void privmed(){
//out << "who" << endl;
}
However, when I run this I get the error:
error: there are no arguments to ‘privmed’ that depend on a template parameter, so a declaration of ‘privmed’ must be available [-fpermissive]
privmed();
Any help with this would be incredible!