Please help: C++ question
dirt
KC
First, I appoligize for asking a question about homework but, when you need help you always go to someone who can.
If an int starts with zeros, how can you force them to be displayed in a cout statement. Right now I'm just getting random numbers displayed if it starts with zeros.
Thank You.
If an int starts with zeros, how can you force them to be displayed in a cout statement. Right now I'm just getting random numbers displayed if it starts with zeros.
Thank You.
0
Comments
int i = 0;
cout << i << endl;
and it will just display 0
if u did, then just do
cout << vector << endl;
this cout statement will just display that vector.
fin >> dec;
fin int;
cout.fill (0);
cout >> setw(7) >> int
cout.fill (' ')