Inconsistent <iomanip> behavior
I have the following code
cout << setfill('0') << setw(4) << hex << 100 << 100 << std::endl;
If I want every number with a width of 4 I have to use
out << setfill('0') << setw(4) << hex << 100 << sew(4) << 100 << std::endl;
But if I want to print every number with hex and setfill ('0'), I only need to set setfill ('0') and std :: hex once.
Will C ++ design this on purpose? what is his intention?
source to share