Ask coding questions

← Back to all posts
Conio.h Not found in c?
Crcoli7307 (32)

I am trying to include the conio.h library in C but it keeps saying it's not found...

Comments
hotnewtop
chaseban (0)

use #include<curses.h> in place of #include<conio.h>


as said before;
getch() becomes getchar()

oignons (68)

Try printing the ANSI code \033[2J.

Crcoli7307 (32)

I'm not trying to use getch() I'm trying to use clrscr()

CodeLongAndPros (1631)

If you need getch(), look at getchar(). Anything more, look at curses.

SixBeeps (5335)

conio.h is a compiler-specific header file, and GCC doesn't support it.

CodeLongAndPros (1631)

@SixBeeps

conio.h is a compiler-specific header file, and GCC doesn't support it.

Ahem: Windows vendor lock in.

mwilki7 (1134)

@Crcoli7307 repl uses a compiler for linux
im used to seeing conio.h for windows machines which may be why the repl compiler cant find it

try
https://stackoverflow.com/questions/7469139/what-is-the-equivalent-to-getch-getche-in-linux
if you need a linux equivalent for getch