purpose of conio.h in C

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jimhakans
    New Member
    • Sep 2007
    • 41

    purpose of conio.h in C

    Can anyone tell me when to add conio.h header file. Is it when you are using getche() function or it has some other functionality as well.
  • sicarie
    Recognized Expert Specialist
    • Nov 2006
    • 4677

    #2
    jimhakans-

    Is this something that Google cannot tell you? Did you research this yourself before you posted?

    Comment

    • jimhakans
      New Member
      • Sep 2007
      • 41

      #3
      Originally posted by sicarie
      jimhakans-

      Is this something that Google cannot tell you? Did you research this yourself before you posted?
      Yes, i have searched that but i am not satisfied. By the way can see many people in this forum who are asking question which google can easily answer.
      I have read that conio is used to perform "console input and output" from a program, which is what i dont understand. stdio.h is used for the same thing right?

      Comment

      • oler1s
        Recognized Expert Contributor
        • Aug 2007
        • 671

        #4
        I have read that conio is used to perform "console input and output" from a program, which is what i dont understand. stdio.h is used for the same thing right?
        Sort of. stdio declares functions useful for output. Some of them are tied to stdin/stdout which usually links to the console. conio is outright console functions. Specifically, conio is additional functions that might be useful in making text user interfaces. It's not really a method of i/o as much as controlling a few additional things for the console that C cannot provide.

        stdio.h is standard. conio.h is not. It may not exist. If it does, it's compiler specific. As there is no standard for conio.h, your conio.h may not be, and probably isn't, the same as someone else's here. If they have it that is.

        Comment

        Working...