ynotoriginal1@yahoo.com (J.D) wrote in message news:<a296a119.0407191452.7ff305f9@posting.google. com>...[color=blue]
> Hi everyone.
>
> I've been trying to create a simple program that would allow the user
> to see an updated set of values without having newline after newline.
>
> For example:
>
> Value: 4 // the 4 could be replaced in the same position
> with another
> number and so on.
>
> I've been playing around with sprintf and I've gotten good results
> with:
>
>
> /* Placed in a loop with a time delay. Values are updated in the same
> line
> */
> sprintf(buff, "\r Cpu 0 Temp: %.2f C Cpu 1 Temp: %.2f C Sys Temp:
> %.2f C ", t, t1, t2);
>
> cout << buff;
>
>
> However, when i add a second row:
>
> Cpu 0 Temp: 30 C Cpu 1 Temp: 31 C Sys Temp: 30 C
> HD Size: 20 G
>
> my solution no longer works.
>
>
> Any help would be appreciated.
>
> Thanks[/color]
You can't do it using ANSI C++. You would need to refer to your C++
library and see if it provides any functions, like gotoxy() etc.
--
Imanpreet Singh Arora
@isingh@ AT @ACM@ DOT @ORG@