Home  >  Article  >  What header file is conio.h?

What header file is conio.h?

藏色散人
藏色散人Original
2020-12-24 16:10:4638508browse

conio.h is the console input and output function header file, where con is the English abbreviation of console Console, io is Input/Output input and output, it does not belong to the C language standard library; it also defines the console Functions for data input and data output, such as keyboard input and screen output.

What header file is conio.h?

#The operating environment of this article: Windows 7 system, Dell G3 computer.

The "conio.h" header file is the console input and output function header file. con is the English abbreviation of Console, and io is Input/Output input and output. It is not part of the C language standard library.

It defines functions for data input and data output through the console, such as keyboard input and screen output. It is an input and output function library used in the early C language. Except for a few functions, it is basically not used now (but the standard library stdio.h is used).

The functions that may be used are getch(); and kbhit(void);

getch(); is used to read the pressed keys instantly (without waiting for the carriage return and line feed key to arrive) ).

kbhit(void); Used to instantly check whether there is a key press. Other functions are rarely used.

Contained functions

cgets(char*);;
cputs(constchar*);
cscanf(constchar*,...);
inpw(unsignedshort);
getch(void);
getche(void);
kbhit(void);
outp(unsignedshort,int);
outpw(unsignedshort,unsignedshort);
putch(int);
ungetch(int);
void_Cdeclclreol(void);
void_Cdeclclrscr(void);
void_Cdecldelline(void);
int_Cdeclgettext(intleft,inttop,intright,intbottom,void*destin);
void_Cdeclgettextinfo(structtext_info*r);
void_Cdeclgotoxy(intx,inty);
void_Cdeclhighvideo(void);
void_Cdeclinsline(void);
void_Cdecllowvideo(void);
int_Cdeclmovetext(intleft,inttop,intright,intbottom,intdestleft,intdesttop);
void_Cdeclnormvideo(void);
int_Cdeclputtext(intleft,inttop,intright,intbottom,void*source);
void_Cdecltextattr(intnewattr);
void_Cdecltextbackground(intnewcolor);
void_Cdecltextcolor(intnewcolor);
void_Cdecltextmode(intnewmode);
int_Cdeclwherex(void);
int_Cdeclwherey(void);
void_Cdeclwindow(intleft,inttop,intright,intbottom);
char*_Cdeclcgets(char*str);
int_Cdeclcprintf(constchar*format,...);
int_Cdeclcputs(constchar*str);
int_Cdeclcscanf(constchar*format,...);
int_Cdeclgetch(void);
int_Cdeclgetche(void);
char*_Cdeclgetpass(constchar*prompt);
int_Cdeclkbhit(void);
int_Cdeclputch(intc);
int_Cdeclungetch(intch);

Usage

The conio library is not only suitable for Windows platforms, but can also be used under Linux. There are already compatibility packages online. After downloading, you can open it and use it; however, the Xcode provided in Mac's os X does not support this function library.

Recommended: "Programming Video"

The above is the detailed content of What header file is conio.h?. 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