Ok, i have a function that reads the presses of a keypad attached to a microcontroler that outputs an int value assigned to a specific keypress for example, if the user presses "1" it reurns an integer value of 2048.
I was given this function to use, and i cannot alter it.
what i am attempting to do is create a function that takes the values of the function described above and makes the return values useable for doing math (ie, you press one, it returns one).
where i am running into a problem here is when the user presses zero on the keypad, i have it do return(0)...which returns a null value, as far as i can tell (whatever it returns, it is most certainly not an integer value of 0).
are there any tricks that i should know about to return an integer value of 0 from a function?