Thread: I need to get the conio library

  1. #1
    Registered User zergdeath1's Avatar
    Join Date
    Sep 2003
    Posts
    39

    Question I need to get the conio library

    My compiler, DevC++ 4.something only has 62% of the conio.c compiler and it doesn't have the function i need. Is it possible for me to get a new conio.c that will work. Or could one of you post the function of kbhit() in you conio.c so that i could copy it into mine. (The conio.h has the kbhit prototype).

    Basically how do i get kbhit.
    Stolen Quote: Buttered Toast always lands butter side down and cats always land on their feet, what happens when you strap buttered Toast to the back of a cat?
    My Quote: Practice Makes Perfect Nobodys Perfect Why Practice?

  2. #2
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    I wrote one for linux using vVv's code in the FAQ. It shouldn't be that hard to port it to windows. Search the linux board for getch()

  3. #3
    Registered User zergdeath1's Avatar
    Join Date
    Sep 2003
    Posts
    39

    two things

    Two things:

    1. I am too new at programming to port something.

    2. Im looking for the kbhit() function.
    Stolen Quote: Buttered Toast always lands butter side down and cats always land on their feet, what happens when you strap buttered Toast to the back of a cat?
    My Quote: Practice Makes Perfect Nobodys Perfect Why Practice?

  4. #4
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    kbhit() can be implamented with a getch() function.

  5. #5
    Registered User
    Join Date
    Jan 2003
    Posts
    78
    Why do you need this function anyway? It is a throwback to the days of DOS. I suggest you concentrate on the event driven paradigms present in modern Windows and Linux development. The basics are really not difficult to grasp... even for a beginner.

    Try asking in the Windows forum... kbhit and conio are not part of the C++ language.

  6. #6
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    Why not upgrade to Dev-C++ 4.9.8 or later? Then you'll have it.

  7. #7
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398

    Exclamation You may need a different compiler.

    See This FAQ for some suggestions.

    This FAQ explains why you can't use <conio> from a different compiler.

    Standard C++ is designed to work with a system where nothing gets sent-out from the keyboard 'till you hit enter. This helps with portability... but causes the problem you're having.

    Of course, Windows is not part of the C++ language standard either! Personally, I didn't find it that easy. Here's a Windows tutorial, so you can check it out yourself.

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. better c string functions
    By samps005 in forum C Programming
    Replies: 8
    Last Post: 11-04-2003, 01:28 PM