F
fb
Hi everyone...
I have a small problem with showpos placing a '+' in the wrong spot.
What I have is:
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
....
....
I want to place a '+' in front of all these as so:
+0000 +0000 +0000 +0000 +0000 etc...
....
....
The problem with the code below is that the '+' sign is placed in a
wierd spot. Something like: 00+0
(notes: 'Accumulator' is an int that holds a value from -9999 to 9999)
cout << "accumulator: " << showpos << setw(4) << setfill('0') <<
Accumulator << endl;
Thanks.
I have a small problem with showpos placing a '+' in the wrong spot.
What I have is:
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
....
....
I want to place a '+' in front of all these as so:
+0000 +0000 +0000 +0000 +0000 etc...
....
....
The problem with the code below is that the '+' sign is placed in a
wierd spot. Something like: 00+0
(notes: 'Accumulator' is an int that holds a value from -9999 to 9999)
cout << "accumulator: " << showpos << setw(4) << setfill('0') <<
Accumulator << endl;
Thanks.