一、EasyX适用于visual C++
二、学会创建画面与圆的函数
#include<graphics.h>
#include<conio.h>
#include<stdio.h>
int main()
{
double y = 300, x = 20;
double dy = 0, g = 0.1;
double dx = 4;
initgraph(600, 600);//初始化600*600的画面
while (1) {
cleardevice();//清除掉之前的内容
dy += g;
y += dy;
if (y >= 580) {
dy = -0.98 * dy;
}
if (y > 580) y = 580;
x += dx;
if (x >= 580||x<=20) dx = -dx;
fillcircle(x, y, 20);//以(x,y)为圆点画以20为半径的圆
Sleep(10);//暂停10毫秒
}
_getch();
closegraph();//关闭窗口
return 0;
}