In C language we used to write.
printf("%4d",1);
the output of such statement was 0001.
What is the replacement of this one in C++.
I know setw to reserve columns but what about this one?
We can also use the cout<<setfill('0'); but i there anyother option accomplishing this task?