How can I indent cout output?
cout has special characters, below are two:
'\t' - tab
'\n' - new line
Hope it helped.
You can construct a string to contain a number of repitions of a character:
std::cout << std::string(level, '-') << root->value << std::endl;