桁指定の0詰めをしたいけど
cout << setw(4) << setfill('0');
cout << 0 << endl;
cout << 0 << endl;
とかくと"0000", "0" となります。
1回の設定で全部のcoutに桁指定0詰めをさせる方法はありませんか?

cout << setw(4) << setfill('0') << 0 << endl;
cout << setw(4) << setfill('0') << 0 << endl;
と書くとオーバーヘッドがありそうで…。