宏定义里面含有结构体怎么办
有这么个宏定义:
struct node{
int x,y;
}P[N];
#define MAKE_VECTOR(p1,p2) (struct node) {P[p2].x-P[p1].x,P[p2].y-P[p1].y}
int crossP(struct node v1,struct node v2){
return v1.x*v2.y - v2.x*v1.y;
}
int isleft(int p1,int p2,int p3){
return crossP(MAKE_VECTOR(p1,p2),MAKE_VECTOR(p2,p3));
}
可是不知道怎么写才对,总报错~~~。请高手指点下