This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Changing already written text in console


Antonio Eduardo Fermiano wrote:
I want to make a console program where I can modify certain parts of already written text, like a progress %
number and some indicators written some lines above. Can someone give me a way to do it?

Don't know if helps, but I'm using the GCC port for windows that comes with Dev-cpp.

Kids these days ...

Look up what terminal your console is emulating. (hint: think ANSI).

Most likely the basics like "\r" will work to return to the start of a line. But if you want to get more fancy you'll have to look up the other escape codes. If you want to go all portable, consider learning ncurses which does most of this for you.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]