I am trying to build a ping-pong game on my mac using C++14 (g++ in terminal) and I am getting this error:
use of undeclared identifier 'kbhit'
here is the code: https://github.com/DemonJAZ/GamesC
The function is in GameManager
, class named Input
.
Since there is no sentence with a squiggly mark in the end, I took a liberty to invent a couple of my own.
Why am I getting this error?
There is no kbhit
function in the C++ language.
Why am I seeing people using it all over the place? Why does it work for them?
They are using it on Windows. It's a Windows function. You are on Mac OS X.
I like to be able to use this function. What should I do?
There are several options.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.