Computer Science Canada

kbhit error

Author:  void [ Tue Jun 24, 2003 11:37 am ]
Post subject:  kbhit error

im using DEV c++ compiler..im learning c++, and rite now im trying to just get accustomed to this, so i did a do while loop thingy..and this is the code:
code:

#include<iostream>
#include<stdlib.h>
#include<conio.h>
using namespace std;
int main()
{
 do
 {
   cout << "Press Any Key To Continue"<<endl;
 }while (!kbhit());
  return EXIT_SUCCESS;
}

but it keeps returinging an error saying
Quote:

implicit declaration of function 'int kbhit(...)'

what am i doing wrong?

Author:  Catalyst [ Tue Jun 24, 2003 12:47 pm ]
Post subject: 

kbhit isnt declared either is EXIT_SUCCESS

Author:  Homer_simpson [ Tue Jun 24, 2003 4:49 pm ]
Post subject: 

it works fine for me... both in DevC++ and VC++

Author:  void [ Wed Jun 25, 2003 9:27 am ]
Post subject: 

but they are both predefined....arent they?...thats what this tutorial i read said...

Author:  Catalyst [ Wed Jun 25, 2003 12:27 pm ]
Post subject: 

sorry i didnt know they were predefined

Author:  Homer_simpson [ Wed Jun 25, 2003 7:32 pm ]
Post subject: 

the command is in conio.h


: