From Bugzilla Helper: User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.2.12-32 i686) Description of problem: cout.width() doesnt seem to work with float numbers, similarly for setw() How reproducible: Always Steps to Reproduce: 1. main program test.cpp with cout.width(20); cout.precision(10); cout << 123.234567 << '\n'; 2. g++ --version => 2.96 3. g++ -o test.exe test.cpp, test.exe Actual Results: 123.234567 (no leading blanks) Expected Results: 123.234567 (leading blanks) Additional info:
This was fixed soon after 7.0 release, please upgrade to the gcc (and especially libstdc++) from updates (2.96-69) or to 7.1 gcc (2.96-81).