Hello everyone is there a command in C for deleting the previous character?
For example:
I want to be able to display some text and then delete the last character, but show it first before it deletes. I know about system("CLS") but that deletes the whole line.
I know its a weird thing to want, but its for design purposes.
If you know of such thing or if it even exists then let me know.
Thanks.
Delete character command in C?Is there a command to delete the previous character in the C?
Page 1 of 1
3 Replies - 746 Views - Last Post: 14 April 2010 - 07:13 AM
Replies To: Delete character command in C?
#2
Re: Delete character command in C?
Posted 13 April 2010 - 03:53 PM
copy the text that is displayed to the screen and than print it back out without the last character?
#3
Re: Delete character command in C?
Posted 14 April 2010 - 06:56 AM
use the command \b this will delete single character.
#4
Re: Delete character command in C?
Posted 14 April 2010 - 07:13 AM
#include <stdio.h>
int main() {
printf( "hello" );
fflush( stdout );
sleep(2);
putchar('\b');
putchar(' ');
fflush( stdout );
sleep(2);
putchar('\n');
}
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|