感谢您的建议。我尝试使用ncurses,但是它给了我以下错误:Undefined symbols for architecture x86_64:
"_stdscr", referenced from:
_main in test-54aaa4.o
"_wgetch", referenced from:
_main in test-54aaa4.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation) - Gopal Srivastava
你是否已经链接了libncurses库?仅仅包含头文件是无法完成库链接的。 - Rob Napier