On Tue, 25 Aug 1998, James wrote:

>why when i run the following does it wait 5 seconds then display
>.\.\.\.\.\ instead of displaying . [wait 1 second] \ . [wait 1 second]...

Because you don' t flush the output stream.

>
>/* start */
>#include <stdio.h>
>#include <unistd.h>
>
>int main()
>{
>        int c;
>
>        for (c = 0; c < 5; c++) {
>                printf (".");
                fflush(NULL); /* will cure the problem */
>                sleep (1);
>                printf ("\\");
>        }
>
>        return 0;
>}
>/* end */
>
>-- 
>[EMAIL PROTECTED]                http://x-map.home.ml.org
>

Andrea[s] Arcangeli

Reply via email to