Home >Backend Development >C#.Net Tutorial >What does conio.h mean in c language?

What does conio.h mean in c language?

angryTom
angryTomOriginal
2020-02-08 13:45:279219browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn