c语言的几个简单问题

来源:百度知道 编辑:UC知道 时间:2024/05/12 20:06:10
帮忙简单注释一下。谢谢~~
#include <dos.h>
#include <graphics.h>
#include <math.h>
#define FNX(x) (int)(xo+(x)*1.0)
#define FNY(y) (int)(getmaxy()-(yo+(y)*1.0))
#define FNX2(phi) cos(phi)*ac-sin(phi)*bs
#define FNY2(phi) cos(phi)*as+sin(phi)*bc
void elli(int xo,int yo,int a,int b,double theta)
elli(x+168,y+282,10,20,-40);

#include 是包含文件命令,这个程序包含了三个头文件dos.h graphics.h math.h

#define 是宏定义,这个程序定义了FNX(X),FNY(y),FNX2(phi),FNY2(phi)四个宏,在程序中,所有的宏都会被替换为这里定义的内容,例如,程序中的FNX(X)在执行时会被替换为(int)(xo+(x)*1.0) 。

void elli(int xo,int yo,int a,int b,double theta) 是函数的声明
elli(x+168,y+282,10,20,-40);是对刚才声明的elli()函数的一次调用。