Hi, I'm trying to code the functionality of a cellphone keyboard, where have to press key '2' three times in order to get letter 'C' and so on. Every time the user types a character it is printed to the screen using putchar(). What I cant do is print a backspace, so that the the cursor goes back one space and the letter on that space can be deleted. I tought if I used "putchar(0x08)" it would work, but it doesn't, when I do that the cursor goes forward. I'm using a switch loop to see what key the user pressed, here's the code for the case when the backspace key (B) is pressed

Code:
case 'B':  	if (pos > 0) {
		        putchar(0x08);
			pos --;
			count = 0;
		}
		break;
But as i said, it just prints a space after the last input, instead of going back. So I would appreciate any help on how to do this. Also, I'm trying not to use gotoxy to go back and erase characters, so that the function can be used no mather what the coordinates are.

Tnx for any help.