Direct screen writes in a console session

It would be easier to find something if I knew what I was looking for.

I want to be able to put a character or string at a specific place on the 25x80 console screen. I believe there are libraries out there that do this.

I'm using Codeblocks as my IDE in Win7. I am using the gnu gcc compiler.

Give me the name of something that will do this so I can find it and a tutorial on it. If you know of a good tutorial, a link would be even better.

I also have never used an external library. Just the ones that ship with gcc, so my next question will be, where do I put what to make the magic work. I'm not quite sure how to formulate this into search terms. And again, if you know of a good tutorial, I would appreciate a link.

Thank you for whatever help you can give me.
Last edited on
On a windows system you can use the SetConsoleCursorPosition function, though this is often conveniently used inside a function called gotoxy() which simplifies its use. (some versions of the non-standard <conio.h> already have the gotoxy() function, but that will vary between compilers).

See post by forum member Duoas

http://www.cplusplus.com/forum/beginner/4234/#msg18563


For a cross-platform solution, look into ncurses.
Last edited on
Thank you. I'm set now.
Topic archived. No new replies allowed.