#include<conio.h>

conio库详解
本文详细介绍了conio库中的一系列函数,这些函数主要用于控制台的输入输出操作,包括字符读取、位置设置等功能,适用于需要控制台交互的程序设计。
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);
#include <graphics.h> #include <conio.h> #include <time.h> #include <vector> #include <string> #include <random> #include <ctime> #include <windows.h> #include <cmath> // 颜色定义 #define COLOR_PINK RGB(255, 204, 229) #define COLOR_LIGHT_BLUE RGB(204, 229, 255) #define COLOR_LIGHT_GREEN RGB(204, 255, 229) #define COLOR_LIGHT_YELLOW RGB(255, 255, 204) #define COLOR_LIGHT_PURPLE RGB(229, 204, 255) #define COLOR_LIGHT_ORANGE RGB(255, 229, 204) #define COLOR_SOFT_RED RGB(255, 179, 186) #define COLOR_SOFT_BLUE RGB(179, 217, 255) #define COLOR_SOFT_GREEN RGB(179, 255, 204) #define COLOR_SOFT_YELLOW RGB(255, 255, 179) #define COLOR_SOFT_PURPLE RGB(221, 179, 255) #define COLOR_SOFT_ORANGE RGB(255, 221, 179) #define COLOR_SOFT_CYAN RGB(179, 255, 255) #define COLOR_SOFT_MAGENTA RGB(255, 179, 238) #define COLOR_PALE_PINK RGB(255, 225, 235) #define COLOR_PALE_BLUE RGB(225, 235, 255) #define COLOR_PALE_GREEN RGB(225, 255, 235) #define COLOR_PALE_YELLOW RGB(255, 255, 225) #define COLOR_PALE_PURPLE RGB(235, 225, 255) #define COLOR_PALE_ORANGE RGB(255, 235, 225) #define COLOR_RED_HEART RGB(255, 0, 0) // 爱心符号颜色 #define COLOR_CLOSE_BTN RGB(204, 0, 0) // 关闭按钮颜色 #define COLOR_TEXT_TITLE RGB(0, 0, 0) // 标题文字颜色(黑色) // 消息结构体 struct Message { std::wstring text; int x; int y; int width; // 窗口宽度 int height; // 窗口高度 int titleBarHeight; // 标题栏高度 COLORREF color; // 窗口主体颜色(标题栏颜色) COLORREF contentColor; // 内容区域颜色 bool active; int alpha; int lifetime; bool animating; // 是否正在动画中 int animFrame; // 动画帧数 }; 这一段若要变成c语言能运行的代码,要怎么改
最新发布
11-23
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值