I am using a loop to delete characters from a string using printf(\b) 1 by 1 and sleep 0.1 seconds in between. But when I run the code it happens simultaneously.
I literally tried typing each printf because I thought the loop might be the cause but still, the output was the same
#include <stdio.h>
#include <unistd.h>
void coolIntro(){
int i;
printf("A Game by Hideo Kojima");
Sleep(800);
for(i=0;i<12;i++){
printf("\b");
Sleep(100);
}
printf("my_name_here");
}
I want the letters to disappear with a 0.1 seconds time interval.