Basically, I want to know the function that allows you to remove a character put on the console. For instance, if I take the character 'X' and use putc('X', stdout), it puts the character on the stdout console, but I want to remove that character now to where it is nothing, so I can create an infinite while that will have the character flash. Any help would be great, thanks.
C Programming Question-Flash Character in stdout
Computer Gaming ForumTry printing ASCII code 8 (backspace).
putc((char)8,stdout);
putc((char)8,stdout);
Thanks, I used that to backspace, and then putc(NULL, stdout) and it worked fine, thanks again.
Here's what I got to make it work:
#include <stdio.h>
int main()
{
int temp = 0;
while(temp < 10000)
{
putc('X', stdout);
putc((char)8, stdout);
putc(NULL, stdout);
putc((char)8, stdout);
temp++;
}
}
Unfortunately, I have to figure out how to make a delay between flashes, but I got the flash working.
#include <stdio.h>
int main()
{
int temp = 0;
while(temp < 10000)
{
putc('X', stdout);
putc((char)8, stdout);
putc(NULL, stdout);
putc((char)8, stdout);
temp++;
}
}
Unfortunately, I have to figure out how to make a delay between flashes, but I got the flash working.
another thing you can do is to use the escape character \b Either way, does the same thing.
Original thread: https://assemblergames.com/threads/c-programming-question-flash-character-in-stdout.13826/