compiler error
| bluegray (34) | |||
| What does this compiler error mean? error: expected constructor, destructor, or type conversion before '&' token
| |||
| Duoas (1595) | |||
I'm not sure, but shouldn't it be:
BT<T>& BT<T>::operator = (const BT<T>& otherTree )? Hope this helps. | |||
| bluegray (34) | |||
| That was right! Thank you | |||
| bluegray (34) | |||
Maybe someone can hep me with another question! The normal way i know how to do a binary tree traversal is to do it like this
However my instructor has an extra parameter and i dont know what its for. She doesnt have office hours till thursday, could anyone help explain this.
inOrder(Node<T>*, void (*)(T&)); | |||
| jsmith (958) | |||
| It is a pointer to a function to call on the node. (Note that your code does a cout on each node (2nd line). Her code instead calls the function passed in. | |||
This topic is archived - New replies not allowed.
