| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 814 人关注过本帖
标题:这是什么错误?
只看楼主 加入收藏
丛林小妖
Rank: 1
等 级:新手上路
帖 子:12
专家分:0
注 册:2008-9-14
收藏
 问题点数:0 回复次数:0 
这是什么错误?
#include"graphics.h"
#include"dos.h"
#include"conio.h"
#include "stdlib.h"

int main()
{
int gd=DETECT,gm,x=20,y=20,a=20,b=20,dx=1,dy=1;
int size,i;
void *buf;
initgraph(&gd,&gm,"");
setcolor(4);
    randomize();
    for(i=0;i<2000;i++)
    putpixel(random(640),random(480),random(15));
      
do
{ /*cleardevice() ;*/
    setfillstyle(6,4);
    fillellipse(x,y,a,b);
  
         size=imagesize(x,y,a,b);
    buf=malloc(size);
    getimage(x,y,a,b,buf);
     x+=dx;y+=dy;
     if(x==630||x==10) dx*=-1;
     if(y==472||y==8) dy*=-1;
  
   putimage(x,y,buf,COPY_PUT);
  
  delay(500);
} while(!kbhit());
  closegraph();
  return 0;
}

未命名.jpg (14.6 KB)
图片附件: 游客没有浏览图片的权限,请 登录注册
搜索更多相关主题的帖子: include 
2008-10-12 16:54
快速回复:这是什么错误?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017042 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved