/ XMU_ACM /

记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:9:5: error: unknown type name 'V'
     V a,b,c d;
     ^
/in/foo.c:9:5: note: use 'struct' keyword to refer to the type
/in/foo.c:9:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'd'
     V a,b,c d;
             ^
/in/foo.c:13:36: error: request for member 'x' in something not a structure or union
         scanf("%d%d%d%d%d%d%d%d",&a.x,&a.y,&b.x,&b.y,&c.x,&c.y,&d.x,&d.y);
                                    ^
/in/foo.c:13:41: error: request for member 'y' in something not a structure or union
         scanf("%d%d%d%d%d%d%d%d",&a.x,&a.y,&b.x,&b.y,&c.x,&c.y,&d.x,&d.y);
                                         ^
/in/foo.c:13:46: error: request for member 'x' in something not a structure or union
         scanf("%d%d%d%d%d%d%d%d",&a.x,&a.y,&b.x,&b.y,&c.x,&c.y,&d.x,&d.y);
                                              ^
/in/foo.c:13:51: error: request for member 'y' in something not a structure or union
         scanf("%d%d%d%d%d%d%d%d",&a.x,&a.y,&b.x,&b.y,&c.x,&c.y,&d.x,&d.y);
                                                   ^
/in/foo.c:13:55: error: 'c' undeclared (first use in this function)
         scanf("%d%d%d%d%d%d%d%d",&a.x,&a.y,&b.x,&b.y,&c.x,&c.y,&d.x,&d.y);
                                                       ^
/in/foo.c:13:55: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:13:65: error: 'd' undeclared (first use in this function)
         scanf("%d%d%d%d%d%d%d%d",&a.x,&a.y,&b.x,&b.y,&c.x,&c.y,&d.x,&d.y);
                                                                 ^
/in/foo.c:14:17: warning: implicit declaration of function 'intersections' [-Wimplicit-function-declaration]
         return (intersections(a,b,c,d));
                 ^~~~~~~~~~~~~
/in/foo.c: At top level:
/in/foo.c:17:19: error: unknown type name 'V'
 int intersections(V a;V b;V c;V d)
                   ^
/in/foo.c:17:23: error: unknown type name 'V'
 int intersections(V a;V b;V c;V d)
                       ^
/in/foo.c:17:27: error: unknown type name 'V'
 int intersections(V a;V b;V c;V d)
                           ^
/in/foo.c:17:31: error: unknown type name 'V'
 int intersections(V a;V b;V c;V d)
                               ^
/in/foo.c:39:15: error: unknown type name 'V'
 int direction(V a;V b;V c;)
               ^
/in/foo.c:39:19: error: unknown type name 'V'
 int direction(V a;V b;V c;)
                   ^
/in/foo.c:39:23: error: unknown type name 'V'
 int direction(V a;V b;V c;)
                       ^
/in/foo.c: In function 'direction':
/in/foo.c:42:7: error: 'b' undeclared (first use in this function)
     q=b.x-a.x;
       ^
/in/foo.c:42:11: error: 'a' undeclared (first use in this function)
     q=b.x-a.x;
           ^
/in/foo.c:43:7: error: 'c' undeclared (first use in this function)
     w=c.x-a.x;
       ^
/in/foo.c: At top level:
/in/foo.c:49:15: error: unknown type name 'V'
 int onSegment(V a;V b;V c;)
               ^
/in/foo.c:49:19: error: unknown type name 'V'
 int onSegment(V a;V b;V c;)
                   ^
/in/foo.c:49:23: error: unknown type name 'V'
 int onSegment(V a;V b;V c;)
                       ^
/in/foo.c: In function 'onSegment':
/in/foo.c:52:8: error: 'a' undeclared (first use in this function)
     if(a.x>b.x)
        ^
/in/foo.c:52:12: error: 'b' undeclared (first use in this function)
     if(a.x>b.x)
            ^
/in/foo.c:62:14: error: 'c' undeclared (first use in this function)
     if(minx<=c.x<=maxx&&miny<=c.y<=maxy)
              ^
/in/foo.c:65:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

信息

递交者
类型
递交
题目
线段交点个数
语言
C
递交时间
2018-05-19 10:22:35
评测时间
2018-05-19 10:22:35
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes