[LCP]Another Simple C question
Andrew Weaver
Andrew.Weaver at tecnomen.fi
Thu Jul 4 20:40:06 UTC 2002
What are you trying to achieve? If you replace the \n with \r then it would
tend to overwrite itself on the display.
On Thursday, July 04, 2002 10:46 AM, James Mclean [SMTP:james at adam.com.au]
wrote:
>
> OK, along the same lines as before, how would i do the same thing, but
> this time with multiple lines?
>
> Here is the code i have been trying to do it with.
>
> #include <stdio.h>
> #include <unistd.h>
>
> int main(void) {
>
> int i;
>
> printf("\n");
>
> for(i = 1; i < 21; i++ ) {
> printf("Value is %d\n",i);
> printf("Another one here %d\n",i);
> printf("Nothing here\n");
> printf("Final One %d\n",i);
> fflush(stdout);
> sleep(1);
> }
>
> printf("\n");
>
> return 0;
> }
>
> I have tried changing the \n's with \r's, and obviously it all ends up
> on one line, and i have tried \r instead of the final \n.
>
> Any help would be great :)
>
> Regards,
>
>
> James Mclean
>
> "Increased knowledge will help you now.
> Have a mate's phone bugged."
> -- /usr/games/fortune
>
> _______________________________________________
> This is the Linux C Programming List
> : http://lists.linux.org.au/listinfo/linuxcprogramming List
More information about the linuxCprogramming
mailing list