怎么定义一个四边形的结构体呢,根本无从下手啊,是要求用点吗,还是用坐标
就两个结构体啊,你有啥问题
typedef struct _Point
{
double x;
double y;
}Point;
typedef struct _Quadrangle
{
Point point[4];
}Quadrangle;
struct Point
{
double x, y;
};
struct Quadrangle
{
struct Point leftup; //左上顶点
struct Point rightup; //右上顶点
struct Point rightbtm; //右下顶点
struct Point leftbtm; //左下顶点
};
您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!