keypad storing problem (void value not ignored as it ought to be)
Your GetNumber function is defined to return void (nothing) while you use it as if it returns the number typed.

change GetNumber to return a int and the end of it do a atoi using the buffer and return the result.