find length of an int string.

to find a string length value it is strlen();, what is that for the int value and how do i do something below in c++?

1
2
3
int number = 15;
if (length_function_here(number) == 3)
return;


length_function_here being the function that can count the length of an int value
Last edited on
to get an ints length divide it by 10 and add 1

EDIT - That will only work with positive numbers of course so divide the number by -1 first for negative numbers
Last edited on
Theres no such function like this in c++? o.o
Just last week I went looking for the function solveWorldsEnergyProblem() and that doesn't exist either.
1
2
3
4

if( 3 == sizeof( number ) )
    return;
Topic archived. No new replies allowed.