root->right漏写置空了
for(int i=0;i<res.size()-1;i++) { int data=res.front(); res.pop(); printf("%d ",data); }
每弹一次队列size就会减少,这样就弹不完