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

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




PostPosted: Thu Mar 25, 2004 3:31 pm   Post subject: kbhit()

well this is two questions:

what are the things called that you "include" (like #include<iostream>), is it called a library?

and the main questions: what "library" or whatever do i have to include in my program to get this to work, as i want to use it with a while loop.

thanks

time to sign my name:
jonos
Sponsor
Sponsor
Sponsor
sponsor
wtd




PostPosted: Thu Mar 25, 2004 4:48 pm   Post subject: (No subject)

Typically you're including a header file, which defines input and output of functions, and interfaces to classes, but not how they actually accomplish what they're doing.

More strictly, "libraries" are what we call the bits of code that answer that "how" question.

And the file you're looking for is conio.h.

code:
#include <conio.h>

int main()
{
   while (kbhit())
      // do something.
   return 0;
}


I would shy away from conio.h since it isn't part of ANSI standard C.
jonos




PostPosted: Thu Apr 01, 2004 7:56 am   Post subject: (No subject)

is there another command or whatever not in conio that is kind of like that?
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  [ 3 Posts ]
Jump to:   


Style:  
Search: