What is the equivalent to getch() & getche() in Linux?

后端 未结 6 2089
南方客
南方客 2020-11-22 05:53

I am not able to find the equivalent header file for conio.h in Linux.

Is there any option for getch() & getche() function in Linux?

6条回答
  •  生来不讨喜
    2020-11-22 06:30

    You can use the curses.h library in linux as mentioned in the other answer.

    You can install it in Ubuntu by:

    sudo apt-get update

    sudo apt-get install ncurses-dev

    I took the installation part from here.

提交回复
热议问题