Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 kbhit error
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
void




PostPosted: 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?
Sponsor
Sponsor
Sponsor
sponsor
Catalyst




PostPosted: Tue Jun 24, 2003 12:47 pm   Post subject: (No subject)

kbhit isnt declared either is EXIT_SUCCESS
Homer_simpson




PostPosted: Tue Jun 24, 2003 4:49 pm   Post subject: (No subject)

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




PostPosted: Wed Jun 25, 2003 9:27 am   Post subject: (No subject)

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




PostPosted: Wed Jun 25, 2003 12:27 pm   Post subject: (No subject)

sorry i didnt know they were predefined
Homer_simpson




PostPosted: Wed Jun 25, 2003 7:32 pm   Post subject: (No subject)

the command is in conio.h
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: