[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [LCP]Another Simple C question
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@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