0_0_32588199_6229.c:3:1: error: unknown type name 'using'
using namespace std;
^
0_0_32588199_6229.c:3:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
using namespace std;
^
0_0_32588199_6229.c:7:2: error: expected specifier-qualifier-list before 'Point'
Point(double X = 0, double Y = 0) { x = X, y = Y; }
^
0_0_32588199_6229.c:14:2: error: unknown type name 'Point'
Point p1, p2;
^
0_0_32588199_6229.c:15:2: error: expected specifier-qualifier-list before 'Line'
Line() {}
^
0_0_32588199_6229.c:19:9: error: unknown type name 'Point'
typedef Point Vector;
^
0_0_32588199_6229.c:22:1: error: unknown type name 'Line'
Line line[30];
^
0_0_32588199_6229.c: In function 'Cross':
0_0_32588199_6229.c:32:44: error: request for member 'y' in something not a structure or union
double Cross(Vector A, Vector B) { return B.y*A.x - B.x*A.y; }
^
0_0_32588199_6229.c:32:48: error: request for member 'x' in something not a structure or union
double Cross(Vector A, Vector B) { return B.y*A.x - B.x*A.y; }
^
0_0_32588199_6229.c:32:54: error: request for member 'x' in something not a structure or union
double Cross(Vector A, Vector B) { return B.y*A.x - B.x*A.y; }
^
0_0_32588199_6229.c:32:58: error: request for member 'y' in something not a structure or union
double Cross(Vector A, Vector B) { return B.y*A.x - B.x*A.y; }
^
0_0_32588199_6229.c: At top level:
0_0_32588199_6229.c:34:1: error: unknown type name 'bool'
bool Cross_segment(Point a, Point b, Point c, Point d) {
^
0_0_32588199_6229.c:34:20: error: unknown type name 'Point'
bool Cross_segment(Point a, Point b, Point c, Point d) {
^
0_0_32588199_6229.c:34:29: error: unknown type name 'Point'
bool Cross_segment(Point a, Point b, Point c, Point d) {
^
0_0_32588199_6229.c:34:38: error: unknown type name 'Point'
bool Cross_segment(Point a, Point b, Point c, Point d) {
^
0_0_32588199_6229.c:34:47: error: unknown type name 'Point'
bool Cross_segment(Point a, Point b, Point c, Point d) {
^
0_0_32588199_6229.c:37:2: error: stray '\317' in program
return sgn(c1)*sgn(c2) < 0 && sgn(d1)*sgn(d2) < 0; //1相交 0不相交
^
0_0_32588199_6229.c:37:2: error: stray '\340' in program
0_0_32588199_6229.c:37:2: error: stray '\275' in program
0_0_32588199_6229.c:37:2: error: stray '\273' in program
0_0_32588199_6229.c:37:2: error: stray '\262' in program
0_0_32588199_6229.c:37:2: error: stray '\273' in program
0_0_32588199_6229.c:37:2: error: stray '\317' in program
0_0_32588199_6229.c:37:2: error: stray '\340' in program
0_0_32588199_6229.c:37:2: error: stray '\275' in program
0_0_32588199_6229.c:37:2: error: stray '\273' in program
0_0_32588199_6229.c: In function 'find':
0_0_32588199_6229.c:41:34: error: lvalue required as left operand of assignment
return pre[u] == u ? u : pre[u] = find(pre[u]);
^
0_0_32588199_6229.c: In function 'main':
0_0_32588199_6229.c:48:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (int i = 0; i < 100; i++)
^
0_0_32588199_6229.c:48:3: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
0_0_32588199_6229.c:51:14: error: expected expression before '/' token
int k = 1; //线段数
^
0_0_32588199_6229.c:51:14: error: stray '\317' in program
0_0_32588199_6229.c:51:14: error: stray '\337' in program
0_0_32588199_6229.c:51:14: error: stray '\266' in program
0_0_32588199_6229.c:51:14: error: stray '\316' in program
0_0_32588199_6229.c:51:14: error: stray '\312' in program
0_0_32588199_6229.c:51:14: error: stray '\375' in program
0_0_32588199_6229.c:54:21: error: expected expression before '/' token
scanf("%d", &n); //指令数
^
0_0_32588199_6229.c:54:21: error: stray '\326' in program
0_0_32588199_6229.c:54:21: error: stray '\270' in program
0_0_32588199_6229.c:54:21: error: stray '\301' in program
0_0_32588199_6229.c:54:21: error: stray '\356' in program
0_0_32588199_6229.c:54:21: error: stray '\312' in program
0_0_32588199_6229.c:54:21: error: stray '\375' in program
0_0_32588199_6229.c:57:4: error: 't' undeclared (first use in this function)
t = getchar();
^
0_0_32588199_6229.c:57:4: note: each undeclared identifier is reported only once for each function it appears in
0_0_32588199_6229.c:61:35: error: request for member 'p1' in something not a structure or union
scanf("%lf%lf%lf%lf", &line[k].p1.x, &line[k].p1.y, &line[k].p2.x, &line[k].p2.y);
^
0_0_32588199_6229.c:61:50: error: request for member 'p1' in something not a structure or union
scanf("%lf%lf%lf%lf", &line[k].p1.x, &line[k].p1.y, &line[k].p2.x, &line[k].p2.y);
^
0_0_32588199_6229.c:61:65: error: request for member 'p2' in something not a structure or union
scanf("%lf%lf%lf%lf", &line[k].p1.x, &line[k].p1.y, &line[k].p2.x, &line[k].p2.y);
^
0_0_32588199_6229.c:61:80: error: request for member 'p2' in something not a structure or union
scanf("%lf%lf%lf%lf", &line[k].p1.x, &line[k].p1.y, &line[k].p2.x, &line[k].p2.y);
^
0_0_32588199_6229.c:62:5: error: expected expression before '/' token
//getchar();
^
0_0_32588199_6229.c:64:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (int i = 1; i < k - 1; i++) {
^
0_0_32588199_6229.c:65:35: error: request for member 'p1' in something not a structure or union
if (Cross_segment(line[k - 1].p1, line[k - 1].p2, line[i].p1, line[i].p2)) {
^
0_0_32588199_6229.c:65:51: error: request for member 'p2' in something not a structure or union
if (Cross_segment(line[k - 1].p1, line[k - 1].p2, line[i].p1, line[i].p2)) {
^
0_0_32588199_6229.c:65:63: error: request for member 'p1' in something not a structure or union
if (Cross_segment(line[k - 1].p1, line[k - 1].p2, line[i].p1, line[i].p2)) {
^
0_0_32588199_6229.c:65:75: error: request for member 'p2' in something not a structure or union
if (Cross_segment(line[k - 1].p1, line[k - 1].p2, line[i].p1, line[i].p2)) {
^
0_0_32588199_6229.c:77:5: error: expected expression before '/' token
//getchar();
^
0_0_32588199_6229.c:79:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (int i = 1; i < k; i++)
^
|