Pergunta

I have something like this:

 ______________________
/\                     \
\_| 1. Menu entry one  |
  | 2. Menu entry two  |
  | The user's choice:X|
  |   _________________|_
   \_/___________________/

I'm working on Linux so I can't use the conio.h to move the cursor to the X position. Besides that writing my own gotoXY function would be pointless because resizing the terminal emulator would screw everything up. How can achieve my goal?

Foi útil?

Solução

http://en.wikipedia.org/wiki/ANSI_escape_code

Try messing around with the CSI n B and CSI n D options.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top