c

why does this error occur: 'conio.h' file not found


i'm new to C programing and i was testing some code when i compiled it this error came up:

fatal error: 'conio.h' file not found #include <conio.h>

 

this was on the top of the code i was testing:

#include <stdio.h>
#include <conio.h>
...

i searched about this error but i only found answers related to windows and ubuntu

i'm running mac os


Solution

  • conio.h is not a standard library header, and the functions it declares are not standard library functions - it's specific to an ancient implementation that isn't used much anymore. If the code you're trying to build uses conio routines like getch(), then it won't build on a Mac.