‘壹’ c语言头文件conio.h
conio.h是一个C标准库中的头文件。
conio是Console Input/Output(控制台输入输出)的简写,其中定义了通过控制台进行数据输入和数据输出的函数,主要是一些用户通过按键盘产生的对应操作,比如getch()函数等等。
‘贰’ 谁知道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);
‘叁’ c语言 conio.h
非标准和标准的区别是C语言标准(如C99或C89或K&R C)所建议的。因为C语言标准并对实现这些函数的过程没有要求,所以有些函数的表现一般跟系统和编译器都有关。conio.h包含了一些控制台函数,conio是指Console IO;string.h包含了一些字符串(ANSI和宽字符、多字节字符)的处理及I/O函数
‘肆’ 在C++中#include <conio.h>是什么意思
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.hStandardInputorIutput少用多了。
(4)c语言conioh的内容扩展阅读
适合放在头文件里内容:
对于具有外部存储类型的标识符,可以在其他任何一个源程序文件中经声明后引用,此用户完全可以将一些具有外部存储类型的标识符的声明放在一个头文件中。
具体地说,头文件中可以包括:用户构造的数据类型(如枚举类型),外部变量,外部函数、常量和内联函数等具有一定通用性或常用的量。而一般性的变量和函数定义不宜放在头文件中。
例如:#include<stdio.h>中的头文件stdio.h作用是让链接器通过头文件里的函数声明找到函数实际代码所在的位置即所在的库文件,这样才能使用该函数的实际代码。
函数的实际代码的实现过程是先让链接器通过头文件里函数的声明找到函数实际代码所在的位置即所在的库文件,再通过#include语句把链接器所找到的函数实际代码用链接器把函数的实际代码链接到当前文件即所要执行的程序中。
‘伍’ 谁能给出C语言中<conio.h>中的函数及应用
/***
*conio.h - console and port I/O declarations
*
* Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This include file contains the function declarations for
* the MS C V2.03 compatible console I/O routines.
*
* [Public]
*
****/
#if _MSC_VER > 1000
#pragma once
#endif
#ifndef _INC_CONIO
#define _INC_CONIO
#if !defined(_WIN32) && !defined(_MAC)
#error ERROR: Only Mac or Win32 targets supported!
#endif
#ifndef _MAC
#ifdef __cplusplus
extern "C" {
#endif
/* Define _CRTIMP */
#ifndef _CRTIMP
#ifdef _DLL
#define _CRTIMP __declspec(dllimport)
#else /* ndef _DLL */
#define _CRTIMP
#endif /* _DLL */
#endif /* _CRTIMP */
/* Define __cdecl for non-Microsoft compilers */
#if ( !defined(_MSC_VER) && !defined(__cdecl) )
#define __cdecl
#endif
/* Define _CRTAPI1 (for compatibility with the NT SDK) */
#ifndef _CRTAPI1
#if _MSC_VER >= 800 && _M_IX86 >= 300
#define _CRTAPI1 __cdecl
#else
#define _CRTAPI1
#endif
#endif
/* Function prototypes */
_CRTIMP char * __cdecl _cgets(char *);
_CRTIMP int __cdecl _cprintf(const char *, ...);
_CRTIMP int __cdecl _cputs(const char *);
_CRTIMP int __cdecl _cscanf(const char *, ...);
_CRTIMP int __cdecl _getch(void);
_CRTIMP int __cdecl _getche(void);
#ifdef _M_IX86
int __cdecl _inp(unsigned short);
unsigned short __cdecl _inpw(unsigned short);
unsigned long __cdecl _inpd(unsigned short);
#endif /* _M_IX86 */
_CRTIMP int __cdecl _kbhit(void);
#ifdef _M_IX86
int __cdecl _outp(unsigned short, int);
unsigned short __cdecl _outpw(unsigned short, unsigned short);
unsigned long __cdecl _outpd(unsigned short, unsigned long);
#endif /* _M_IX86 */
_CRTIMP int __cdecl _putch(int);
_CRTIMP int __cdecl _ungetch(int);
#if !__STDC__
/* Non-ANSI names for compatibility */
_CRTIMP char * __cdecl cgets(char *);
_CRTIMP int __cdecl cprintf(const char *, ...);
_CRTIMP int __cdecl cputs(const char *);
_CRTIMP int __cdecl cscanf(const char *, ...);
#ifdef _M_IX86
int __cdecl inp(unsigned short);
unsigned short __cdecl inpw(unsigned short);
#endif /* _M_IX86 */
_CRTIMP int __cdecl getch(void);
_CRTIMP int __cdecl getche(void);
_CRTIMP int __cdecl kbhit(void);
#ifdef _M_IX86
int __cdecl outp(unsigned short, int);
unsigned short __cdecl outpw(unsigned short, unsigned short);
#endif /* _M_IX86 */
_CRTIMP int __cdecl putch(int);
_CRTIMP int __cdecl ungetch(int);
#endif /* __STDC__ */
#ifdef __cplusplus
}
#endif
#endif /* _MAC */
#endif /* _INC_CONIO */
这就是<conio.h> 全部内容,用Windows 的搜索功能,找到这个文件,打开看看,不就成了?
‘陆’ 在c语言里#include<conio.h>是什么样的头文件,包含哪些函数
在c语言里#include<conio.h>是调用函数的头文件。
包含的函数有如下这些:
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.h”是什么意思,有什么作用
conio.h不是C标准库中的头文件。
conio是Console
Input/Output(控制台输入输出)的简写,其中定义了通过控制台进行数据输入和数据输出的函数,主要是一些用户通过按键盘产生的对应操作,比如getch()函数等等。
‘捌’ C语言,"conio.h"头文件是什么是干什么用的都有什么
这貌似是一个提供清除屏幕显示的头文件,不过这不是一个c的标准库,工作不稳定,有时会出错,所以强烈不推荐使用
‘玖’ 在C语言编程中的<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);
‘拾’ C语言中<conio.h>是干什么用的,能具体解释一下吗
conio.h 不是标准C语言的一部分,不推荐使用
名称上很清楚,
con = console 控制台
io = input / output 输入输出
.h = C语言头文件 (包含一些函数、常量、结构体的定义)
里面所定义的函数主要是是用来和控制台交互的,比如移动光标,打印字符,获取键盘输入。