#include <stdio.h>
int main()
{
int i;
printf("Hello, World!\n");
for ( i = 0 ; i < 10 ; i++ ) {
printf("Now %02d\r", i );
fflush( stdout );
Sleep(1000); // Windows specific delay
}
return 0;
}
The "\r" returns to the start of the current line, and the fflush(stdout) ensures your text can be seen.
The delay of course is your extended file reading code.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.