Ask coding questions

← Back to all posts
conio.h C++
PasAdam (19)

Why #include <conio.h> is not working? And how can I make it work?

Giothecoder (140)

That is not a portable header. In fact it is not part of the standard. Try to avoid conio.h.

PasAdam (19)

@Giothecoder ok, but i need it to use getch();

Giothecoder (140)

@PasAdam hm.. not necessarily. There was someone a while back who actually did manage unbuffered input in c++, if you give me a bit I can probably find it. It was called dungeon crawl or something like that?

Giothecoder (140)

@PasAdam found something better I think,

Edit: if you go to input.hpp, literally the first thing there is an implementation of getch();

PasAdam (19)

thank you @Giothecoder, I will try to do something with it

AkshayaS4 (1)

this is the first time i am using replit so can u tell where i can find input.hpp or how i can go to that