class BinaryTree {
public:
BinaryNode* root;
bool search(int val, BinaryNode* zero = root){ // Error
...
}
};
I have tried to add a static
access specifier to root
but it throws error: undefined reference to BinaryTree::root'