0

I use mac OS X Yosemite. Getchar() works fine, but getch() does not work. It says "Implicit declaration of function 'getch' is invalid in C99.

Jin kim
  • 155
  • 1
  • 2
  • 8

1 Answers1

1

getch() is declared in conio.h which is not part of the Standard C Library.

From Wikipedia:

conio.h is a C header file used mostly by MS-DOS compilers to provide console input/output. It is not part of the C standard library or ISO C, nor is it defined by POSIX.

Sadique
  • 22,572
  • 7
  • 65
  • 91