void printLevel(int x, node* p)
{
if(!p)return;
if(x)
{
printLevel(x-1,p->Left);
printLevel(x-1,p->Right);
}
else
{
cout<<p->Data;
}
}
for(int i = 0; i<NumberOfLevels;i++)
{
printLevel(i,head);
}
Something like this would do it. A combination of recursion and itteration
this code is not tested
Matt