I am making a simple animation function as part of a program.
at the moment I use printf to print information
and then use the'\b' character to delete it before starting again with the next set of data
But the '\b' will not delete newline characters so the out put is not deleted.
Is there and function or anything that can remove printed characters (includeing \ characters?)
any help is appriciated
There is no standard way to go back up on the screen.
To "go back", you'd need a funciton like "gotoxy()" in Turbo C, which places the cursor at a defined X and Y coordinate point.
This is not part of C/C++ standards, but rather specific to each OS/Compiler implementation.
I have 'make' on linux AND miricle C on windows
Originally Posted by matsp
WHich library would that function be in
also how whould I use it?
Thanks for help
"make" on linux is not a compiler - you are probably using gcc.
On Linux (and to some extent in Windows) you can use ANSI escape codes: http://en.wikipedia.org/wiki/ANSI_color
In Windows, you can use SetConsoleCursorPosition (one of several Console Functions that can be found here:http://msdn.microsoft.com/en-us/libr...73(VS.85).aspx).
Miracle C is not a good compiler from what I hear - you can get the same compiler as on Linux, gcc, in the gcc-mingw package, which is a high quality compiler [and with the added advantage of being very similar for both Linux and Windows, so you don't have to keep so many things in mind when moving from one to the other].
Yes, but it also works to do "abc\b\b\bdef", and you will see "def" on the screen (and not like on an old typewriter, abc overwritten by def.
Originally Posted by robwhit
bleugh you caught me before I realized that wasn't what the op was talking about.