conio.h

This is a discussion on conio.h within the Linux Programming forums, part of the Platform Specific Boards category; I have just learned Linux for a few months. I am using Red Hat 7.2 with gcc 2.96. I experienced ...

  1. #1
    still a n00b Jaguar's Avatar
    Join Date
    Jun 2002
    Posts
    187

    Question conio.h

    I have just learned Linux for a few months. I am using Red Hat 7.2 with gcc 2.96. I experienced that most header files can be included but conio.h. Please anyone tell me how can I compile C/C++ with conio.h included, using gcc or g++.

    ---------------------------
    Thanks
    Jaguar
    ---------------------------

  2. #2
    still a n00b Jaguar's Avatar
    Join Date
    Jun 2002
    Posts
    187

    Angry

    Very helpful but still not clear due to huge multi-lingual database.
    I was suggested to use curses.h.
    I question if curses.h is similar to conio.h.
    If I don't want to change source code (like getchar), what shall I do?

    ------------
    Thanks
    Jaguar
    ------------

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >>If I don't want to change source code (like getchar), what shall I do?
    getchar() is ANSI so it will be available. Did you mean getch() ?
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  4. #4
    still a n00b Jaguar's Avatar
    Join Date
    Jun 2002
    Posts
    187
    Oh sorry, I meant getch() not getchar()

    -------------
    Thanks
    Jaguar
    -------------

  5. #5
    Im back! shaik786's Avatar
    Join Date
    Jun 2002
    Location
    Bangalore, India
    Posts
    345
    >I question if curses.h is similar to conio.
    Yes, they are quiet similar in functionality.

    >If I don't want to change source code (like getchar), what shall I do?
    getch() if available in curses as well.

  6. #6
    Comment your source code! Lynux-Penguin's Avatar
    Join Date
    Apr 2002
    Posts
    533
    copy conio.h into /usr/include
    however on some WEIRD versions of gcc you will need to recompile in other cases the INCLUDE list of includes is somewhere with all the library includes. umm also
    most includes are just external prototypes and the rest is compiled objects.... usually.
    Asking the right question is sometimes more important than knowing the answer.
    Please read the FAQ
    C Reference Card (A MUST!)
    Pointers and Memory
    The Essentials
    CString lib

  7. #7
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >>copy conio.h into /usr/include
    http://www.cprogramming.com/boardfaq.html#header
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  8. #8
    still a n00b Jaguar's Avatar
    Join Date
    Jun 2002
    Posts
    187

    Talking

    Thanks that's very helpful

    Jaguar

  9. #9
    Registered User stautze's Avatar
    Join Date
    Apr 2002
    Posts
    195
    Originally posted by Lynux-Penguin
    copy conio.h into /usr/include
    however on some WEIRD versions of gcc you will need to recompile in other cases the INCLUDE list of includes is somewhere with all the library includes. umm also
    most includes are just external prototypes and the rest is compiled objects.... usually.
    that will not work in any case, not just the "weird" ones...
    'During my service in the United States Congress, I took the initiative in creating the Internet.' - Al Gore, March 9, 1999: On CNN's Late Edition

  10. #10
    still a n00b Jaguar's Avatar
    Join Date
    Jun 2002
    Posts
    187

    Question

    I have tried many cases. Only curses.h is OK, conio.h will never work on linux. But I wonder C/C++ were born with UNIX, why gcc and g++ do not support ANSI C/C++. I know that i/o on DOS and UNIX are different. But I think it's not the reason for 4th Generation Language.

    ----------------
    Thanks
    Jaguar
    ----------------

  11. #11
    Comment your source code! Lynux-Penguin's Avatar
    Join Date
    Apr 2002
    Posts
    533
    BAM!

    Get the CONIO Library

    http://www.ibiblio.org/pub/historic-...ibs/INDEX.html
    comes with header in which you put in /usr/include and put the library where it belongs (distribution specific)
    Asking the right question is sometimes more important than knowing the answer.
    Please read the FAQ
    C Reference Card (A MUST!)
    Pointers and Memory
    The Essentials
    CString lib

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. conio.h not working in *nix
    By wise_ron in forum C Programming
    Replies: 2
    Last Post: 05-04-2006, 01:54 PM
  2. conio.h in Visual C++ ?
    By Born_2B_Alone in forum Windows Programming
    Replies: 3
    Last Post: 09-22-2004, 07:32 PM
  3. Getting textcolor in conio.h to work with Win32
    By MMD_Lynx in forum C Programming
    Replies: 5
    Last Post: 09-02-2004, 01:32 PM
  4. Can't Find Conio.h?
    By drdroid in forum C++ Programming
    Replies: 27
    Last Post: 09-26-2002, 04:24 AM
  5. Conio.h file problems
    By Unregistered in forum C++ Programming
    Replies: 4
    Last Post: 05-23-2002, 01:44 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21