求教:怎么判断计算机有没有按下某个键

灌水区

CodeRe @ 2025-01-10 22:33:48

怎么用c++实现按下某个键(或几个键一起)就执行一些代码啊


by see_htdls @ 2025-01-10 22:36:58

getchar()


by MLE_Automaton @ 2025-01-10 22:47:15

windows下可以用getch()


by MichaelZeng @ 2025-01-11 00:14:32

用getch() 然后判断ASCII码,每个键都有对应的ASCII码


by MichaelZeng @ 2025-01-11 00:14:41

@CodeRe


|