一般人都知道的问题c++
帮忙看看下面的程序哪儿有错
#include "stdafx.h"
#include <graphics.h>
#include <conio.h>
class location
{
protected:
int x,y;
public:
location(int initx,int inity);
};
class point:public location
{
public:
point(int initx,int inity);
void show();
void hide();
void moveto(int newx,int newy);
};
class circles:point
{
private:
int radius;
public:
circles(int initx,int inity,int initradius);
void show();
void hide();
void expand(int expandby);
void moveto(int nx,int ny);
void contract(int contractby);
};
location::location(int initx,int inity)
{
x=initx;
y=inity;
}
point::point(int initx,int inity):location(initx,inity)
void point::show()
{
putpixel(x,y,getcolor());
}
void point::hide()
{
putpixel(x,y,getbkcolor());
}
void point::moveto(int newx,int newy)
{
hide();
x=newx;
y=newy;
show();
}
circles::circles(int initx,int inity,int initradius):point(int initx,int inity)
{
radius=initradius;
}
void circles::show()
{
circle(x,y,radius);
}
void circles::hide()
{
unsighed int tempcolor;
temcolor=getcolor();
setcolor(getbkcolor());
circle(x,y,radius);
setcolor(tempcolor);
}
void circles::expand(int expandby)
{
hide();
radius+=expandby;
if(radius<0)
eadius=0;
show;
}
void ciecles::moveto(int newx,int newy)
{
hide();
x=newx;
y=newy;
show();
}
main()
{
int gdriver=DETECT,gmode;
inigraph(&gdriver,&gmode,"c:..\\bgi");
circles myciecle(100,200,50);
setcolor(10);
mycircle.show();
getch();
mycircle.moveto(200,250);
getch();
mycircle.expand(50);
getch();
mycircle.contract(75);
getch();
closegraph();
return 0;
}