hello guys. I am stuck in a part of my assignment where I have to use a function which draws a polygon. The parameters of the function are
void drawpoly(int numberOfPoints, int *points);
The problem is that upon mouse click, I get two coordinates, x-axis and y-axis. Can anybody tell how can I convert the two points into a single point? Thankyou
void drawpoly(int numberOfPoints, int *points)
{
//Do something...
}
int main ()
{
int x=5;
int y=7;
int arry[2];
arry[0] = x;
arry[1] = y;
drawpoly(2,arry);
return 0;
}