How to understand C++ std::setw 's inconsistent behaviour?
Given the following code: /*Formatting Output **Goal: practice using cout to format output to console **Print the variables in three columns: **Ints, Floats, Doubles */ #include <iostream> #include <iomanip> using namespace std; int main() { int a = 45; float b = 45.323; double c = 45.5468; int aa = a + 9; float bb = b + 9; double cc = c + 9; int aaa = aa + 9; float bbb = bb + 9; double ccc = cc + 9; // 1st attempt :> cout << "\n\n\n" << "// 1st attempt :>" << "\n"; cout << "12345678901234567890123456789012345678901234567890" << "\n"; cout << "Ints" << setw(15) << "Floats" << setw(15) <<