if I did this:
int i=1
printf("%03d\n", i);
then it would print: "001"
How can I do this with the cout fucntion?
I'm need to print some stuff to a file and so i'm using the ostream class. When outputting to the file you use << like regular cout function so that's why I want to know this.
Thanks.
int i=1
printf("%03d\n", i);
then it would print: "001"
How can I do this with the cout fucntion?
I'm need to print some stuff to a file and so i'm using the ostream class. When outputting to the file you use << like regular cout function so that's why I want to know this.
Thanks.