Why is curses on linux giving me following error?

前端 未结 2 1835
我寻月下人不归
我寻月下人不归 2020-12-16 01:50

Trying to get getch() working to capture key press.

    #include 
    ...
    ...
    WINDOW *w;
    char f;

   w = initscr();
   timeout(30         


        
2条回答
  •  被撕碎了的回忆
    2020-12-16 02:16

    The above answers are correct but the format is:

    gcc -Wall program.c -o name_of_binary -lncurses

    When I did:

    gcc -Wall -lncurses program.c...

    It did not work so apparently it should be tacked on the end.

提交回复
热议问题