关于的问题

zhucheng139122 2008-10-18 04:47:08
有哪位前辈或者大侠能个小弟讲讲这个头文件的用法啊
最好能有个例子什么的
呵呵 由于比较简单 就没分啦 哈哈哈
...全文
145 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Big鹏 2008-10-19
  • 打赏
  • 举报
回复

/* conio.h

Direct MSDOS console input/output.

Copyright (c) Borland International 1987,1988
All Rights Reserved.
*/
#if !defined(__VIDEO)
#define __VIDEO

#if __STDC__
#define _Cdecl
#else
#define _Cdecl cdecl
#endif

#ifndef __OLDCONIO__

struct text_info {
unsigned char winleft;
unsigned char wintop;
unsigned char winright;
unsigned char winbottom;
unsigned char attribute;
unsigned char normattr;
unsigned char currmode;
unsigned char screenheight;
unsigned char screenwidth;
unsigned char curx;
unsigned char cury;
};

enum text_modes { LASTMODE=-1, BW40=0, C40, BW80, C80, MONO=7 };

#if !defined(__COLORS)
#define __COLORS

enum COLORS {
BLACK, /* dark colors */
BLUE,
GREEN,
CYAN,
RED,
MAGENTA,
BROWN,
LIGHTGRAY,
DARKGRAY, /* light colors */
LIGHTBLUE,
LIGHTGREEN,
LIGHTCYAN,
LIGHTRED,
LIGHTMAGENTA,
YELLOW,
WHITE
};
#endif

#define BLINK 128 /* blink bit */

extern int _Cdecl directvideo;

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);
#endif

char *_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);

#endif
backway 2008-10-18
  • 打赏
  • 举报
回复
 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);


----------------------------------------------
http://baike.baidu.com/view/1623334.htm
xplovexjy 2008-10-18
  • 打赏
  • 举报
回复
这个头文件就是
要是要用的头文件是标准库的,就用#include <标准库头文件名>
例如是 #include <vector>
#include <string>

如果头文件是自己定义的,就是说你自己写得,就用#include “文件名”
例如我写了一个头文件叫touwenjian
那么就是 #include “touwenjian.h”

64,652

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧