in C++ ints are basic types ( ie: not classes )
There are many ways to check whether a number has 2 digits but not using a method ( since it's not a class object )
You can convert the int to a string and check its length, you can read it as a string in the first place and you can convert it to int when you need it, you can use log10 to determine the number of significant digits, or you can and should do the obvious: check whether it is within the range of 10 and 99.
Edit: here is a fast, more general function (faster than log10 or converting to a string, that is):
1 2 3 4 5 6 7 8 9 10 11
template <class I> I countDigits(I x)
{
I count=1;
I value=10;
while (x>=value)
{
value*=10;
count++;
}
return count;
}