0_0_16244282_31398.c: In function 'cmp':
0_0_16244282_31398.c:11:13: error: 'point' undeclared (first use in this function)
return ((*(point *)p1).x+(*(point *)p1).y)>((*(point *)p2).x+(*(point *)p2).y)? 1 : -1;
^
0_0_16244282_31398.c:11:13: note: each undeclared identifier is reported only once for each function it appears in
0_0_16244282_31398.c:11:20: error: expected expression before ')' token
return ((*(point *)p1).x+(*(point *)p1).y)>((*(point *)p2).x+(*(point *)p2).y)? 1 : -1;
^
0_0_16244282_31398.c:11:37: error: expected expression before ')' token
return ((*(point *)p1).x+(*(point *)p1).y)>((*(point *)p2).x+(*(point *)p2).y)? 1 : -1;
^
0_0_16244282_31398.c:11:56: error: expected expression before ')' token
return ((*(point *)p1).x+(*(point *)p1).y)>((*(point *)p2).x+(*(point *)p2).y)? 1 : -1;
^
0_0_16244282_31398.c:11:73: error: expected expression before ')' token
return ((*(point *)p1).x+(*(point *)p1).y)>((*(point *)p2).x+(*(point *)p2).y)? 1 : -1;
^
0_0_16244282_31398.c: At top level:
0_0_16244282_31398.c:14:17: error: unknown type name 'point'
double distance(point p1,point p2)
^
0_0_16244282_31398.c:14:26: error: unknown type name 'point'
double distance(point p1,point p2)
^
0_0_16244282_31398.c: In function 'main':
0_0_16244282_31398.c:22:2: error: unknown type name 'point'
point *arr;
^
0_0_16244282_31398.c:24:9: error: 'point' undeclared (first use in this function)
arr = (point *)malloc(sizeof(point) * n);
^
0_0_16244282_31398.c:24:16: error: expected expression before ')' token
arr = (point *)malloc(sizeof(point) * n);
^
0_0_16244282_31398.c:31:9: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for(int i=0;i<n;i++)
^
0_0_16244282_31398.c:31:9: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
0_0_16244282_31398.c:32:26: error: request for member 'x' in something not a structure or union
scanf("%lf%lf",&arr[i].x,&arr[i].y);
^
0_0_16244282_31398.c:32:36: error: request for member 'y' in something not a structure or union
scanf("%lf%lf",&arr[i].x,&arr[i].y);
^
0_0_16244282_31398.c:34:20: error: request for member 'x' in something not a structure or union
if(n==2 && arr[0].x==arr[1].x && arr[0].y==arr[1].y)
^
0_0_16244282_31398.c:34:30: error: request for member 'x' in something not a structure or union
if(n==2 && arr[0].x==arr[1].x && arr[0].y==arr[1].y)
^
0_0_16244282_31398.c:34:42: error: request for member 'y' in something not a structure or union
if(n==2 && arr[0].x==arr[1].x && arr[0].y==arr[1].y)
^
0_0_16244282_31398.c:34:52: error: request for member 'y' in something not a structure or union
if(n==2 && arr[0].x==arr[1].x && arr[0].y==arr[1].y)
^
0_0_16244282_31398.c:46:11: error: redefinition of 'i'
for(int i=1;i<n-1;i++)
^
0_0_16244282_31398.c:31:17: note: previous definition of 'i' was here
for(int i=0;i<n;i++)
^
0_0_16244282_31398.c:46:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for(int i=1;i<n-1;i++)
^
|