最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
栈的操作演示程序
时间:2022-07-02 10:57:01 编辑:袖梨 来源:一聚教程网
#include
#include
#include
#include
#define OK 1
#define ERROR 0
#define OVERFLOW -1
typedef int Status;
typedef int ElemType;
typedef int bool;
/* WIN-TC BGI 图形编程模板 */
#include "Conio.h"
#include "graphics.h"
#include "dos.h"
#define closegr closegraph
void initgr(void) /* BGI初始化 */
{
int gd = DETECT, gm = 0; /* 和gd = VGA,gm = VGAHI是同样效果 */
registerbgidriver(EGAVGA_driver);/* 注册BGI驱动后可以不需要.BGI文件的支持运行 */
initgraph(&gd, &gm, "");
}
void drawmat(char *mat,int matsize,int x,int y,int color)
/*依次:字模指针、点阵大小、起始坐标(x,y)、颜色*/
{int i,j,k,n;
n=(matsize-1)/8+1;
for(j=0;j
if(mat[j*n+i]&(0x80>>k)) /*测试为1的位则显示*/
putpixel(x+i*8+k,y+j,color);
}
char zhan64H[]={
/* 以下是 '栈' 的 64点阵华文隶书 字模,512 byte */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x30,0x00,0x1C,0x00,0x00,0x00,
0x00,0x00,0x38,0x00,0x1C,0x01,0x80,0x00,
0x00,0x00,0x78,0x00,0x1C,0x03,0xC0,0x00,
0x00,0x00,0x7C,0x00,0x1C,0x03,0xC0,0x00,
0x00,0x01,0xFF,0x80,0x3F,0xFF,0xF0,0x00,
0x00,0x0F,0xFF,0xE3,0xFF,0xFF,0xFF,0x00,
0x01,0xFF,0xFF,0xF7,0xFF,0xFF,0xFF,0x00,
0x01,0xFF,0xFF,0xF7,0xFF,0xFF,0xFE,0x00,
0x03,0xFF,0xFF,0xE7,0xFF,0xFF,0xFC,0x00,
0x03,0xFF,0xFF,0xC7,0xFF,0x00,0x00,0x00,
0x03,0xFF,0xFF,0x80,0x0F,0x00,0x00,0x00,
0x03,0xFF,0xFC,0x00,0x0F,0x00,0x00,0x00,
0x03,0xFE,0x78,0x00,0x0F,0x9F,0xF8,0x00,
0x01,0xE0,0x70,0x00,0x3F,0xFF,0xFE,0x00,
0x00,0x00,0x78,0x07,0xFF,0xFF,0xFE,0x00,
0x00,0x00,0xFC,0x0F,0xFF,0xFF,0xFC,0x00,
0x00,0x01,0xFE,0x0F,0xFF,0xFF,0xF8,
相关文章
- 《燕云十六声》配置要求介绍 12-25
- 《燕云十六声》搬砖介绍 12-25
- 时空中的绘旅人天宇之间怎么玩 绘旅人天宇之间活动玩法介绍 12-25
- QQ2024年度报告怎么看 2024qq年度报告玩法介绍 12-25
- 归龙潮珠砂什么时候up 归龙潮红缘绮梦卡池介绍 12-25
- 王者荣耀S38赛季有什么更新 12-25