I do not understand logic in following expression, although it works perfectly:
cout << left << setw(6) << "hello" << "there." ;
The previous code correctly outputs what I expect: hello there.
My logic is:
cout << "hello" << left << setw(6) << "there.";
But it outputs something unexpected: hellothere.
My expectation is that first character "t" of "there" be at 7th column on output area that is after 6 columns width. In other words my concept is that "left setw(n)" should mean "n columns (spaces) from first one on output area", like some data forms with numbered columns for easy find data.
Could you please explain?