无法打开inlude mysql.h_无法打开#include <graphics.h>

#include#include#include#defineWIDTH120#defineHEIGHT120?voidmian(){FILE*fp;unsignedcharbmp[16][200];unsignedcharbmp2[WIDTH][HEIGHT*3];inti=...

#include

#include

#include

#define WIDTH 120

#define HEIGHT 120

?

void mian()

{

FILE *fp;

unsigned char bmp[16][200];

unsigned char bmp2[WIDTH][HEIGHT*3];

int i = 1,size1 = 0,size2 = 0,size0 = 0;

int j = 0;

if((fp = fopen(&gdriver,&gmode,"d:\\ava.bmp","rb")) == NULL)

exit(0);

i = 0;

fseek(fp,54L,0);

while(i < WIDTH*HEIGHT*3)

{

*(bmp2[0]+i) = fgetc(fp);

i++;

}

fclose(fp);

initgraph(700, 700);/*打开图形窗口,这里这个函数我之前是在VC下编译的,用了一个网上的绘图库,与TC的打开图形界面函数有所差别,改掉就可以了输出图片,这里是打点的方式在图形界面输出*/

for(i = 0;i < (WIDTH-1);)

{

for(j =0;j < (HEIGHT-1)*3 ;)

{

putpixel(50+(j/3),600-(i/1),RGB((int)bmp2[i][j+2],(int)bmp2[i][j+3],(int)bmp2[i][j+4]));//输出像素点

j+=3;

}

i++;

}

getchar();

closegraph();

}

我用的就是TC的。

请问什么是下载好的graphics.h。从哪里下载?

我是新手,我是重网上复制的。

展开

#include "graphics.h" #include "stdio.h" #include "dos.h" #include "conio.h" #include "bios.h" #include "stdlib.h" #include "math.h" #ifdef __cplusplus #define __CPPARGS ... #else #define __CPPARGS #endif #define VK_LEFT 0x4b00 #define VK_RIGHT 0x4d00 #define VK_DOWN 0x5000 #define VK_UP 0x4800 #define VK_HOME 0x4700 #define VK_END 0x4f00 #define VK_SPACE 0x3920 #define VK_ESC 0x011b #define VK_ENTER 0x1c0d #define VK_PGUP 0x4900 #define VK_PGDOWN 0x5100 #define TIMER 0x1c void drawblock(int,int,int); void nedr(void); void fk(int,int,int,int); void rewr(int,int,int,int); void rrwf(int,int); int is_bd(int,int,int); int is_line(void); void interrupt ( *oldhandler)(__CPPARGS); void KillTimer(void); void SetTimer(void interrupt (*IntProc)(__CPPARGS)); void rscore(int); int fkt[]={0,4,8,12,14,16,18}; int cj[]={0,100,300,900,1500}; long grc[]={0,3000,60000,90000,120000,150000,180000,210000,240000,270000}; int cjb[]={0,0,0,0,0,0,0,0,0,0}; char cjc[]="score: 0"; char grad[]="grade:0"; struct shape { short xy[8]; short color; short next; }; struct shape shapes[19]= { /* {x1,y1,x2,y3,x3,y3,x4,y4,color,next} */ {1,1,2,1,3,1,3,2,LIGHTBLUE,1}, /* □□□□ */ {2,2,3,0,3,1,3,2,LIGHTBLUE,1}, /* □■□□ */ {1,1,1,2,2,2,3,2,LIGHTBLUE,1}, /* □■□□ */ {2,0,2,1,2,2,3,0,LIGHTBLUE,-3}, /* □■■□ */ {1,1,1,2,2,1,3,1,LIGHTCYAN,1}, /* □□□□ */ {2,0,3,0,3,1,3,2,LIGHTCYAN,1}, /* □■■□ */ {1,2,2,2,3,1,3,2,LIGHTCYAN,1}, /* □■□□ */ {2,0,2,1,2,2,3,2,LIGHTCYAN,-3}, /* □■□□ */ {2,1,3,0,3,1,3,2,LIGHTRED,1}, /* □□□□ */ {1,2,2,1,2,2,3,2,LIGHTRED,1}, /* □□□□ */ {1,0,1,1,1,2,2,1,LIGHTRED,1}, /* □■□□ */ {1,0,2,0,2,1,3,0,LIGHTRED,-3}, /* ■■■□ */ {2,1,2,2,3,0,3,1,DARKGRAY,1}, /* □□□□ */ {1,0,2,0,2,1,3,1,DARKGRAY,-1}, /* □□□□ */ /* □■■□ */ /* ■■□□ */ {2,0,2,1,3,1,3,2,MAGENTA,1}, /* □□□□ */ {1,2,2,1,2,2,3,1,MAGENTA,-1}, /* □□□□ */ /* ■■□□ */ /* □■■□ */ {0,1,1,1,2,1,3,1,BROWN,1}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值