
正文
c语言conio函数 c语言conin
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
头文件conio.h包含哪些函数?
conio.h是一个C标准库中的头文件。
conio是Console
Input/Output(控制台输入输出)的简写,其中定义了通过控制台进行数据输入和数据输出的函数,主要是一些用户通过按键盘产生的对应操作,比如getch()函数等等。
包含的函数
cgets(char
*);
cprintf(const
char
*,
...);
cputs(const
char
*);
cscanf(const
char
*,
...);
inp(unsigned
short);
inpw(unsigned
short);
getch(void);
getche(void);
kbhit(void);
outp(unsigned
short,
int);
outpw(unsigned
short,
unsigned
short);
putch(int);
ungetch(int);
转自百度百科.
相关问答
Q1: C语言中stdio.h与conio.h的区别是什么?同样是负责输入输出,有什么不同吗?
stdio的意思是standard input/output,它是C语言的标准库,其中定义了许多标准的输入输出函数。
conio的意思是console input/output,它不是C标准库的一部分,而是MS-DOS的一个输入输出库。也就是说,只有Windows平台上才存在这个头文件。其中定义的函数包括kbhit、cscanf、cprintf、getch等,都是Windows控制台下的输入输出函数。
Q2: 在C++中#include 是什么意思
conio.h不是C标准库中的头文件,是vc下的一个头文件。
conio是Console Input/Output(控制台输入输出)的简写,其中定义了通过控制台进行数据输入和数据输出的函数,主要是一些用户通过按键盘产生的对应操作,比如getch()函数等等。
在C++中#include conio.h简单说就是“通用输入输出库”,主要是文件和标准控制台的输入输出。conio是Console Input/Output(控制台输入输出)的简写,其中定义了通过控制台进行数据输入和数据输出的函数,主要是一些用户通过按键盘产生的对应操作,比如getch()函数等等。
conio.h则是一个库文件,当程序中使用了getch()之类的函数,就需要在代码中引入这个库文件。conio.h是基本输入输出文件,里面有一个很常用的清屏函数clrsr()可以清屏,与stdio.h Standard Input or Iutput 少用多了。
扩展资料
适合放在头文件里内容:
对于具有外部存储类型的标识符,可以在其他任何一个源程序文件中经声明后引用,此用户完全可以将一些具有外部存储类型的标识符的声明放在一个头文件中。
具体地说,头文件中可以包括:用户构造的数据类型(如枚举类型),外部变量,外部函数、常量和内联函数等具有一定通用性或常用的量。而一般性的变量和函数定义不宜放在头文件中。
例如:#includestdio.h中的头文件stdio.h作用是让链接器通过头文件里的函数声明找到函数实际代码所在的位置即所在的库文件,这样才能使用该函数的实际代码。
函数的实际代码的实现过程是先让链接器通过头文件里函数的声明找到函数实际代码所在的位置即所在的库文件,再通过#include语句把链接器所找到的函数实际代码用链接器把函数的实际代码链接到当前文件即所要执行的程序中。
Q3: 在c语言里#include是什么样的头文件,包含哪些函数?
#include conio.h是一个控制输出c语言conio函数的头文件c语言conio函数,包含以下函数c语言conio函数;textbackground(color)函数【设置文本的背景颜色】;clrscr()函数【清屏】;gotoxy()函数【定位】;getch()函数【输入字符看不见】
例如c语言conio函数:
1、char ch;或int ch;
2、getch();或ch=getch();
3、用getch();会等待c语言conio函数你按下任意键,再继续执行下面的语句;
4、用ch=getch();会等待你按下任意键之后,把该键字符所对应的ASCII码赋给ch,再执行下面的语句。
扩展资料:
1、头文件是conio.h,而不是stdio.h。
2、getch();并非标准C中的函数,不存在C语言中。所以在使用的时候要注意程序的可移植性。
3、国内C语言新手常常使用getch();来暂停程序且不知道此函数来源,建议使用getchar();(如果情况允许)代替此功能或更换一款编译器。
Q4: 谁知道C语言conio.h里的函数
conio.h
conio.h不是C标准库中的头文件。
conio是Console
Input/Output(控制台输入输出)的简写,其中定义了通过控制台进行数据输入和数据输出的函数,主要是一些用户通过按键盘产生的对应操作,比如getch()函数等等。
包含的函数
cgets(char
*);
cprintf(const
char
*,
...);
cputs(const
char
*);
cscanf(const
char
*,
...);
inp(unsigned
short);
inpw(unsigned
short);
getch(void);
getche(void);
kbhit(void);
outp(unsigned
short,
int);
outpw(unsigned
short,
unsigned
short);
putch(int);
ungetch(int);
void
_Cdecl
clreol
(void);
void
_Cdecl
clrscr
(void);
void
_Cdecl
delline
(void);
int
_Cdecl
gettext
(int
left,
int
top,
int
right,
int
bottom,
void
*destin);
void
_Cdecl
gettextinfo
(struct
text_info
*r);
void
_Cdecl
gotoxy
(int
x,
int
y);
void
_Cdecl
highvideo
(void);
void
_Cdecl
insline
(void);
void
_Cdecl
lowvideo
(void);
int
_Cdecl
movetext
(int
left,
int
top,
int
right,
int
bottom,
int
destleft,
int
desttop);
void
_Cdecl
normvideo
(void);
int
_Cdecl
puttext
(int
left,
int
top,
int
right,
int
bottom,
void
*source);
void
_Cdecl
textattr
(int
newattr);
void
_Cdecl
textbackground
(int
newcolor);
void
_Cdecl
textcolor
(int
newcolor);
void
_Cdecl
textmode
(int
newmode);
int
_Cdecl
wherex
(void);
int
_Cdecl
wherey
(void);
void
_Cdecl
window
(int
left,
int
top,
int
right,
int
bottom);
har
*_Cdecl
cgets
(char
*str);
int
_Cdecl
cprintf
(const
char
*format,
...);
int
_Cdecl
cputs
(const
char
*str);
int
_Cdecl
cscanf
(const
char
*format,
...);
int
_Cdecl
getch
(void);
int
_Cdecl
getche
(void);
char
*_Cdecl
getpass
(const
char
*prompt);
int
_Cdecl
kbhit
(void);
int
_Cdecl
putch
(int
c);
int
_Cdecl
ungetch
(int
ch);
Q5: 在c语言里#include是什么样的头文件,包含哪些函数?
在c语言里#includeconio.h是调用函数c语言conio函数的头文件。
包含c语言conio函数的函数有如下这些c语言conio函数:
putch(int);
ungetch(int);
void
_Cdecl
clreol
(void);
void
_Cdecl
clrscr
(void);
void
_Cdecl
delline
(void);
cgets(char
*);
cprintf(const
char
*,
...);
cputs(const
char
*);
cscanf(const
char
*,
...);
inp(unsigned
short);
inpw(unsigned
short);
getch(void);
getche(void);
kbhit(void);
outp(unsigned
short,
int);
outpw(unsigned
short,
unsigned
short);
int
_Cdecl
gettext
(int
left,
int
top,
int
right,
int
bottom,
void
*destin);
void
_Cdecl
gettextinfo
(struct
text_info
*r);
void
_Cdecl
gotoxy
(int
x,
int
y);
void
_Cdecl
highvideo
(void);
void
_Cdecl
insline
(void);
void
_Cdecl
lowvideo
(void);
int
_Cdecl
movetext
(int
left,
int
top,
int
right,
int
bottom,
int
destleft,
int
desttop);
void
_Cdecl
normvideo
(void);
int
_Cdecl
puttext
(int
left,
int
top,
int
right,
int
bottom,
void
*source);
void
_Cdecl
textattr
(int
newattr);
void
_Cdecl
textbackground
(int
newcolor);
void
_Cdecl
textcolor
(int
newcolor);
void
_Cdecl
textmode
(int
newmode);
int
_Cdecl
wherex
(void);
int
_Cdecl
wherey
(void);
void
_Cdecl
window
(int
left,
int
top,
int
right,
int
bottom);
har
*_Cdecl
cgets
(char
*str);
int
_Cdecl
cprintf
(const
char
*format,
...);
int
_Cdecl
cputs
(const
char
*str);
int
_Cdecl
cscanf
(const
char
*format,
...);
int
_Cdecl
getch
(void);
int
_Cdecl
getche
(void);
char
*_Cdecl
getpass
(const
char
*prompt);
int
_Cdecl
kbhit
(void);
int
_Cdecl
putch
(int
c);
int
_Cdecl
ungetch
(int
ch);
关于c语言conio函数和c语言conin的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。







