我正在尝试实现键处理程序类,它有名为timeout和getch的成员函数。timeout_ms_ = timeout_ms; wtimeout(window_, timeout_ms_);$ g++ -c key_handler.cppkey_handler.h:12: error: ‘stdscr’ is not a type
ncurses库中的getch()似乎应该能够做到这一点。但是,当我尝试使用getch()时,我得到错误消息"Use of undefined identifier 'getch'“。然后,构建输出还会显示对ncwrap_stdscr和wgetch的未定义引用。我尝试过包含curses.h而不是ncurses,但这给出了相同的错误(这是有道理的,因为ncurses头文件似乎只是一个指向curses.h的符