Hi, how do I do this in c?
That is I want to print out something at 0,10. For example
CPU load: 50%
And I want to update "50%" very often and I don't want to redraw the whole screen, just that space that holds the %, how do I solve this in c?
Hi, how do I do this in c?
That is I want to print out something at 0,10. For example
CPU load: 50%
And I want to update "50%" very often and I don't want to redraw the whole screen, just that space that holds the %, how do I solve this in c?
ncurses, if you are doing this on a Unix-like system.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
ok, so I can't do it with printf? just want to print text at a given position.
Not without a whole heap of system dependancy. I think most X-terms use VT100 terminal emulation, which means you could send some "Escape sequences" to place the cursor - look it up.
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Unix does not support gotoxy() function.
Not everything that can be counted counts, and not everything that counts can be counted
- Albert Einstein.
No programming language is perfect. There is not even a single best language; there are only languages well suited or perhaps poorly suited for particular purposes.
- Herbert Mayer
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Sorry didnt notice it as an user defined function.
gotoxy() reminded me Turbo C library's <conio.h> function.
Last edited by stevesmithx; 10-25-2007 at 07:31 AM.
Not everything that can be counted counts, and not everything that counts can be counted
- Albert Einstein.
No programming language is perfect. There is not even a single best language; there are only languages well suited or perhaps poorly suited for particular purposes.
- Herbert Mayer
thanks guys, exactly what I needed.