when in doubt, rtfm http://www.cplusplus.com/reference/ios/ios_base/width/
The field width determines the minimum number of characters to be written (...)
If the standard width of the representation is shorter than the field width, the representation is padded with fill characters
not what you are trying to do std::cout << std::string(indentation, ' ');