Home > Article > Backend Development > What does conio.h mean in c language?
What does conio.h mean in c language
conio is the abbreviation of Console Input/Output (console input and output), which defines Functions for data input and data output through the console are mainly corresponding operations generated by some users by pressing the keyboard, such as the getch() function and so on.
conio.h is a library file. When functions such as getch() are used in the program, this library file needs to be introduced into the code.
#include <conio.h> int main() { char c; c=getch(); /*从键盘上读入一个字符不回显送给字符变量c*/ putchar(c); /*输出该字符*/ }
getch() is a function used in programming. This function is a non-echo function. When the user presses a certain character, the function automatically reads it without pressing Enter. Some C language commands Line programs will use this function to make games
Compared with the getchar() function, getch() does not require a buffer or the user to press the Enter key. It will read input directly from the keyboard. character.
Benefits of using getch(): Get keyboard input directly, suitable for making instant input programs such as games.
Recommended learning: c language video tutorial
The above is the detailed content of What does conio.h mean in c language?. For more information, please follow other related articles on the PHP Chinese website!