Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void printBT(string sp, string sn, int v)
- {
- string s;
- if (v < currentSize)
- {
- s = sp;
- if (sn == cr) s[s.length() - 2] = ' ';
- printBT(s + cp, cr, 2 * v + 2);
- s = s.substr(0, sp.length() - 2);
- cout << s << sn << table[v] << endl;
- s = sp;
- if (sn == cl) s[s.length() - 2] = ' ';
- printBT(s + cp, cl, 2 * v + 1);
- }
- }
- void display() //wyswietlanie kopca z podzialem na poziomy
- { cr = cl = cp = " ";
- cr[0] = 218; cr[1] = 196;
- cl[0] = 192; cl[1] = 196;
- cp[0] = 179;
- printBT("", "", 0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement