The error is say : 'mypoint' is not declare in this scope.
my struct is
struct point
{
int x;
int y;
};
and my code is :
struct point lineangle(int x1, int y1, int x2, int y2, int n){
double angle=360/n, s,c;
int rotated_x,rotated_y;
DDA(x1,y1,x2,y2);
for(int i=0;i<n;i++){
c = cos(angle*3.14/180);
s = sin(angle*3.14/180);
rotated_x= (x1 +((x2-x1)*c-(y2-y1)*s));
rotated_y= (y1 +((x2-x1)*s+(y2-y1)*c));
struct point mypoint[]={};
mypoint[i].x=x1;
mypoint[i].y=y1;
mypoint[i+1].x = rotated_x;
mypoint[i+1].y = rotated_y;
// DDA(x1,y1,rotated_x,rotated_y);
x2=rotated_x;
y2=rotated_y;
}
return mypoint;
}
i was declare but it not detected.