Thread: What library is kbhit() in?

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    80

    What library is kbhit() in?

    Hi guys, just a quick question: What library is kbhit() in? I get a compiler error that it is not a recognized function. I have compiled with G++ on a Unix comp, and Dev C++ on a Windows compe.

    Thanks again!

  2. #2
    Registered User
    Join Date
    Feb 2002
    Posts
    589
    conio.h but it is not standard so you might get portability problems if you want to port it.

  3. #3
    Registered User
    Join Date
    Apr 2002
    Posts
    80
    That's weird, because I definitly included conio.h, and I got an error regarding implicit declaration....any thoughts?

    Thanks

  4. #4
    Pygmy Monkey ErionD's Avatar
    Join Date
    Feb 2002
    Posts
    408
    Read his post. It isnt standard so conio's functions are pretty vague. You might or you might not have them.
    Dev-C++ doesnt have it even though it has conio. Though you should be including conio.c in Dev...

  5. #5
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,263
    in MSVC its _kbhit() not kbhit() in codewarrior its __kbhit()!
    and in all it is in conio.h.

    im not sure in devC read the header and see if its there!
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  6. #6
    Pygmy Monkey ErionD's Avatar
    Join Date
    Feb 2002
    Posts
    408
    Hey I skimmed through conio.h in Dev C++.
    I found something named _conio_kbhit(). That might be the thing...
    Anyways why does DevC have so many conios?`
    conio.c
    conio.h
    conio_mingw.h

  7. #7
    In The Light
    Join Date
    Oct 2001
    Posts
    598
    howdy,
    conio.h and kbhit() are not defined in gcc, as near as i can tell there exists a similar comand in curses,h or ncurses.h. but i have never used it nor do i know the specifics.

    M.R.
    I don't like you very much. Please post a lot less.
    Cheez
    *and then*
    No, I know you were joking. My point still stands.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What's an import library?
    By chiefmonkey in forum C++ Programming
    Replies: 1
    Last Post: 06-19-2009, 05:00 PM
  2. Property Set Library (PSL) - Announcement
    By vultur_gryphus in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 05-29-2008, 06:04 AM
  3. Makefile for a library
    By sirmoreno in forum Linux Programming
    Replies: 5
    Last Post: 06-04-2006, 04:52 AM
  4. very weird .h problem
    By royuco77 in forum C++ Programming
    Replies: 1
    Last Post: 09-11-2005, 07:55 AM
  5. what library for kbhit() function?
    By ... in forum C++ Programming
    Replies: 6
    Last Post: 03-12-2002, 09:33 PM