#include<graphics.h>
#include<conio.h>
struct FF{
int left,top,right,bottom;
};
struct FF graph={100,100,400,400};
struct FF dot[31][31];
void draw_graph(struct FF *g);
void draw_dot(struct FF dot[30][30]); //绘制高亮方块函数
int main(void)
{
int gdriver=DETECT,gmode;
initgraph(&gdriver,&gmode,"c:\\tc");
draw_graph(&graph);
draw_dot(dot);
getch();
closegraph();
return 0;
}
void draw_graph(struct FF *g)
{
int i;
setcolor(2);
rectangle(g->left,g->top,g->right,g->bottom);
for(i=1;i<=30;i++)
{
line(100,100+i*10-10,400,100+i*10-10);
line(100+i*10-10,100,100+i*10-10,400);
}
}
以上程序在屏幕中绘制一个900的方块,我想让900个方块每个都高亮(即方块左边和上边画白线,右边和下边画黑线,怎么做,我想用我上面的dot[31][31]二维数组。