『壹』 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語言頭文件 (包含一些函數、常量、結構體的定義)
裡面所定義的函數主要是是用來和控制台交互的,比如移動游標,列印字元,獲取鍵盤輸入。