Skip to content
← Back to Community
Conio.h Not found in c?
Profile icon
h
has Hacker Plan
Crcoli7307

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

image

Voters
Profile icon
AkeelWilliams
Profile icon
MiguelRodriC
Profile icon
Tigerxtrunks
Profile icon
Kyle-CarloCarlo
Profile icon
hikmatuzzahra
Profile icon
melvynmetay
Profile icon
Crcoli7307
Comments
hotnewtop
Profile icon
MotilalSanjenba

Same problem with me

Profile icon
chaseban

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

Screenshot(5)
Screenshot(6)

as said before;
getch() becomes getchar()

Profile icon
oignons

Try printing the ANSI code \033[2J.

Profile icon
Crcoli7307

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

Profile icon
CodeLongAndPros

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

Profile icon
SixBeeps

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

Profile icon
CodeLongAndPros

@SixBeeps

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

Ahem: Windows vendor lock in.

Profile icon
Crcoli7307

@SixBeeps Isn't Repl a compiler

Profile icon
mwilki7

@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