Registered: 12 years ago
I'm having trouble with including some of my files in Dev C++ from Bloodshed. For instance, if I take the downloaded files from Malik for binary Tree.h and binarySearchTree.h as an example. I add them to my project and then:
- if I include binaryTree to my main.cpp and run the program = no problem
- if I include instead binarySearchTree.h (which does include binaryTree.h in its own code) = problem.
Here is the error:
In file included from main.cpp binarySearchTree.h - In member function bool bSearchTreeType<elemType>::search(const elemType& ) root undeclared (first use this function).
Essentially it doesn't see the variable root, because this is only declared in binaryTree, and for whichever reason binarySearchTree dpes not reference back to binaryTree correctly. Can anyone help?