Asking for help about correctly writing this constructor

In the baseClass there is only the default constructor
1
2
binaryTreeType();
//default constructor 

1
2
3
4
5
6
  template <class elemType>
binaryTreeType<elemType>::binaryTreeType()
{
root = NULL;
}

In the inherited bSearchTreeType there is no constructor.
Here is what I have:
1
2
template<class elemType>
void bSearchTreeType<int>::inorderTraversal<int> : binarySearchTree {}

I get this error:
1
2
error: expected init-declarator before '<' token
C:\Dev-Cpp\Chapter11\bSearchTree.cpp: error: expected `;' before '<' token 


Insufficient context. Show relevant code.
hint: a constructor is called when an object is constructed
do you not call five member functions, set three member variables and then construct your object

¿so why did you write void bSearchTreeType<int>::inorderTraversal<int> : binarySearchTree {}?

> error: expected init-declarator before '<' token
error messages tend to specify line and column number
¿which one of all the `<' characters in your code was referring to?
Topic archived. No new replies allowed.