define a 2 digit keypad input as an int variable

I need to have the user press start to start a program and then press two digits on the keypad and have those those two digits assigned to a variable. This is part of a much bigger program, but I just can't get this part. For example: I press 2,6. I want the integer variable "distance" to be assigned the value 26. I have tried the 2*10+6 method, but I can't get it to work.

I have tried the 2*10+6 method, but I can't get it to work.

It's line 37 that is wrong, according to my crystal ball.

Don't take that as gospel, though, because my crystal call is in about a million pieces.

int calcDistance( int first, int second )
{ return (first *10 +second); }

...
int distance = calcDistance( firstDigit, secondDigit);
...