he means the one closer to the bottom not the first one
Code:
const int ESC = 27;
const int BACKSPACE = 8;
const int BUFFER_SIZE = 255;
char buffer[BUFFER_SIZE];
int c,i=0;
do
{
c = getch();
//accept this char if it's printable
if (isprint(c))
{
buffer[i++] = (char)c;
putch(c);
}
//support for backspace functionality
if ((c == BACKSPACE) && (i != 0))
{
putch(c); //backspace
putch(' '); //overwrite existing char
putch(c); //backspace back into position
i--;
}
} while((c != '\r') && (c != ESC) && (i < BUFFER_SIZE));
buffer[i] = '\0';
//did it work?
/*of course one line comments are c99 but just ignore the next line*/
cout << endl << buffer << endl;