Mostly, I'd think. I suppose there are also situations where you might want to print an integer with padding in a base that isn't supported by the *printf family.
Type: Posts; User: Barney McGrew
Mostly, I'd think. I suppose there are also situations where you might want to print an integer with padding in a base that isn't supported by the *printf family.
Any code using your function ought to use values within the type's minimum guaranteed range, but a good point nonetheless. Have you considered converting it to an unsigned type?
It's necessary...
I guess there are two things that pop out at me:
- I think it would be more efficient, in the case that n is negative, if you made n a positive value at the beginning of your code instead of...