#include <conio.h> and getch()
I am working on an online C course. I am currently working on lectures introducing stacks. However in this lecture I am told to include #include <conio.h> however it will not work on repl.it.
the second problem I am having is the use of getch() this function also doesn't seem to be working.
Could anyone please help me figure out why these two parts of the code won't work? And how I can fix the problem or even use different headers and functions?
just a side not I have commented out #include <conio.h> in the attached code because the error stopped the code from running.
conio.h is a windows header, won't compile on repl.it while they use linux OS's
same for the system("cls") command
The linux equivalent would be printing a special character that clears the console screen:
if you wanted to put that in a define:
#define clearScreen() printf("\033[H\033[J")