Conio.h file in CodeChef

I gave a solution using the #include<conio.h> command, but got a compilation error in C. What is the substitute for this file?

You don’t need to use #include<conio.h> while submitting Codes with any Online Judge. because GCC compiler doesn’t support it.

@ajit2205 online judges use gcc compilers which does not support conio.h header file.

so no need for getch command ?

so no need for getch command ?

No. You can watch this:

<conio.h> is not part of the C++ or C Standard Libraries, so it is not available on online judges like codechef. And, you don’t need to use getch(), clrscr() , etc. If you must use getch(), use getchar() instead.

Codechef uses gcc 4.0.0-8 (with standard library) for C language ( or another one based on the compiler you select, From Here ). So, if you use anything that is not supported on it, it might not compile.

online judges do not support conio.h

exactly no need to use getch :slight_smile: