编直线程序发生错误WHY
#include "stdio.h"
#include<graphics.h>
#include<conio.h>
main()
{
int drive,mode;
drive=DETECT;
mode=0;
int graph(&drive,&mode£¬".") /* */
int x0,y0,x1,y1,color;
x0=50;y0=50;
x1=200;y1=200;
color=RED;
DDAline(x0,y0,x1,y1,color);
}
DDAline(x0,y0,x1,y1,color)
{
int x0,y0,x1,y1,color;
int x ;
float dx,dy,k,y;
dx=x1-x0;
dy=y1-y0;
k=dy/dx;
y=y0;
for(x=x0;x<=x1;x++)
{
putpixel(x,int(y+0.5),color);
y=y+k;
}
}