Write an integer-to-string function in C++.
Anonimo
The answer involved dividing the integer by successively smaller amounts, relying on the fact that integer division floors the quotient, to "grab" characters corresponding to the numbers starting from the left and going to the right. There had to be three cases, one in which the number was negative, one in which it was zero, and one in which it was positive. Leading zeros should not be added to string.