Hi!
This is my first post here :) and I'm not good with english :)
I hope that you will understand :)
I'm trying to enter a string with only numbers. I solved this but i dont know how to enable delete (backspace button) ?
I solve and this problem but backspace works (arrow go back) but text are not being deleted?
How can i solve this problem?
Here code example:
char backspace=8;
while(1)
{
x=getch();
if (x=='\r')
{
s[i]='\0';
break;
}
if(isdigit(x) || x==backspace)
{
s[i]=x;
i++;
putch(x);
}
}