mardi 24 mars 2015

How to pause for a second in a C program?


I'm creating a simple C program which prints to the console and I want to have the program pause between printing, to create an aesthetic "..." slow printing effect, to make it appear as if it is loading the program. I tried sleep(), but it waits the time before printing the whole line of text before the 'loading' "...".



printf("Loading.");
sleep(1);
printf(".");
sleep(1);
printf(".");




Aucun commentaire:

Enregistrer un commentaire