I have a BinNode<Elem>
class for my Binary Search Tree Implementation.
When I initialise the following: deque< BinNode<Elem>* >::const_iterator iter = n.begin();
I get an error telling me that a colon is expected after deque<>.
Does the deque not support a template argument in a template argument or is this some sort of different error?
Here is a snippet of the function:
template <class Key, class Elem, class KEComp, class EEComp>
void BST<Key, Elem, KEComp, EEComp>::
printBranchesHelp(int branchLen, int nodeSpaceLen, int startLen, int nodesInThisLevel, const deque< BinNode<Elem>* >& n, ostream& out)
{
deque< BinNode<Elem>* >::const_iterator iter = n.begin();
for (int i = 0; i < nodesInThisLevel / 2; i++)
{
out << ((i == 0) ? setw(startLen-1) : setw(nodeSpaceLen-2)) << "" << ((*iter++) ? "/" : " ");
out << setw(2*branchLen+2) << "" << ((*iter++) ? "\\" : " ");
}
out << endl;
}