g++ conio.h: no such file or directory

后端 未结 3 1142
执笔经年
执笔经年 2021-01-11 16:38

I\'m trying to write a program with g++ that uses conio.h header. What I\'m actually trying to do is calling gotoxy function which I used in Borlan

相关标签:
3条回答
  • 2021-01-11 16:53

    Well its not in gcc but it does come with MiniGW. It is specific to Windows.

    For linux you want the ncurses library.

    0 讨论(0)
  • 2021-01-11 17:02

    conio.h is specific to the Windows console environment. Use the curses or ncurses library on Unix; the appropriate function is mvcur() in the low level interface and wmove() in the virtual window interface.

    0 讨论(0)
  • 2021-01-11 17:05

    There's no direct equivalent for g++. conio.h is specific to some DOS compilers. But you can get what you want using ncurses library, its functions are similar to ones in conio.h.

    Here's a link to a very elaborate tutorial: http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/

    0 讨论(0)
提交回复
热议问题