I was trying std::cout.width(int) to see what it did, and it pushes the text right to fill a minimum width:
TH
becomes:
TH
to fill a minimum width of 10. I am wondering if A) there is a way to reverse this, have a number of spaces put AFTER the text to fill a minimum width, and B) is there a way to create a maximum width AND a minimum width?
And on a lesser note, is it possible to create a class derived from cout or ostream?
Width sets the “column” size for what you are printing next with cout.
would print the above as “left” aligned in the column you made.
Different “types” are aligned to certain sides by default.
More info on this reference page.