conio.h

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rajiv Gupta
    New Member
    • Sep 2006
    • 12

    conio.h

    which header file can be used in C instad of conio.h as it is not there in C.
  • tyreld
    New Member
    • Sep 2006
    • 144

    #2
    Depends on what you are trying to do. The <stdio.h> header is probably going to be your best bet.

    Comment

    • sanketbarot
      New Member
      • Sep 2006
      • 30

      #3
      http://www.koders.com/c/fid990B3D848CBA A20BB884EEBB39A F3F9E400D37D3.a spx

      from this site you can download conio.h. Put this header file in your include directory. Before that just check why do you need this header file.

      Comment

      • tyreld
        New Member
        • Sep 2006
        • 144

        #4
        Originally posted by sanketbarot
        http://www.koders.com/c/fid990B3D848CBA A20BB884EEBB39A F3F9E400D37D3.a spx

        from this site you can download conio.h. Put this header file in your include directory. Before that just check why do you need this header file.
        The header file itself is useless without the library that actually implements the function prototypes defined in the header file.

        You are better off using the <stdio.h> header. If you are trying to read from the console use the following (note that "stdin" is a macro that points to the standard input stream):

        Code:
        // reads from named stream and returns an unsigned char cast to an int
        
        int getc(FILE *stream)
        
        // equivalent to getc(stdin)
        
        int getchar(void)
        
        // reads in at most one less than size characters from stream and stores
        // them into the buffer pointed to by s.  Reading stops after an EOF or a
        // newline. If a newline is read, it is stored into the buffer. A '\0' is
        // stored after the last character in the buffer. Returns a pointer to s
        // on success and NULL on failure.
        
        char * fgets(char *s, int size, FILE *stream)

        Comment

        Working...