this is the BFT function m having problem in assigning dequeue node to curr
the compiler gives error " cannot convert bnode<bnode<int>*>* to bnode <int>*" in the dequeue function .
queue<bnode<t>*>q;
bnode<t>*curr=root;
q.enqueue(curr);
if(root==NULL)
cout<<" tree empty "<<endl;
else
{
while( curr )
{
curr=q.dequeue();
q.display();
if(curr->left!=NULL)
//enqueue curr's left
if(curr->right!=NULL)
//enqueue its right
the compiler gives error " cannot convert bnode<bnode<int>*>* to bnode <int>*" in the dequeue function .
t queue<t>::dequeue()
{
if(front==NULL)
return 0;
else
{
bnode<t>*curr=front;
front=front->next;
curr->next=curr;
return curr; //error on this line
}
}