Advertisement
Guest User

Untitled

a guest
Dec 10th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. void printTree(node* p, int level, ofstream& fout)//функция, для изображения дерева на экран
  2. {
  3. if (p)
  4. {
  5. printTree(p->rt, level + 1, fout);
  6. for (int i = 0; i < level; i++)
  7. {
  8. cout << " ";
  9. fout << " ";
  10. }
  11. cout << p->info << endl;
  12. fout << p->info << endl;
  13. printTree(p->lt, level + 1, fout);
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement