Should be a trivial question, but found that setw only apply to its immediate following output, and not sure how to allow it apply to all the following output.
For example, for the following line of code
cout<<setw(3)<<setfill('0')<<8<<" "<<9<<endl;
or
cout.width(3);
cout.fill('0');
cout<<8<<" "<<9<<endl;
I want the output to be 008 009
instead of 008 9