I get the following compiler warning:
Warning C4996: 'kbhit' was declared deprecated
‘kbhit’ was used in the following code:
int s = 0;
time_t now, expire;
cout << "Enter integer: ";
expire = time(NULL) + 8; //wait for 8 seconds
now = time(NULL);
while (!_kbhit() && now < expire)
{ now = time(NULL);
}
if(kbhit()) cin >> s;
else return;
I would be grateful if someone could tell me what the warning means and how do I get rid of it.
Warning C4996: 'kbhit' was declared deprecated
‘kbhit’ was used in the following code:
int s = 0;
time_t now, expire;
cout << "Enter integer: ";
expire = time(NULL) + 8; //wait for 8 seconds
now = time(NULL);
while (!_kbhit() && now < expire)
{ now = time(NULL);
}
if(kbhit()) cin >> s;
else return;
I would be grateful if someone could tell me what the warning means and how do I get rid of it.