In file included from driver.cpp:1:
tree.h: In member function `void tree<T>::leafCount() const':
tree.h:51: error: `val' undeclared (first use this function)
tree.h:51: error: (Each undeclared identifier is reported only once for each function it appears in.)
tree.h: In member function `int tree<T>::calculateHeightHelper(treeNode<T>*)':
tree.h:189: error: `leftPtr' undeclared (first use this function)
tree.h:190: error: `rightPtr' undeclared (first use this function)
tree.h: In member function `void tree<T>::search()':
tree.h:217: error: `data' undeclared (first use this function)
tree.h: In member function `void tree<T>::search() [with T = int]':
driver.cpp:78: instantiated from here
tree.h:217: error: return-statement with a value, in function returning 'void'
tree.h: In member function `int tree<T>::calculateHeight() [with T = int]':
driver.cpp:83: instantiated from here
tree.h:175: error: no matching function for call to `tree<int>::calculateHeight(treeNode<int>*&)'
tree.h:173: note: candidates are: int tree<T>::calculateHeight() [with T = int]
Are the errors i get when i run it. Which is why i mentioned that i think my problems lie within the function headers. Sorry for editing what i already posted i copied the code from the wrong file.