rail.cpp:14:10: error: expected unqualified-id before 'int'
14 | int x, int y;
| ^~~
rail.cpp:17:13: error: invalid declarator before 'lef'
17 | vector<pla> lef,don,rig;
| ^~~
rail.cpp: In function 'bool cmp1(const pla&, const pla&)':
rail.cpp:20:12: error: 'const struct pla' has no member named 'y'
20 | return a.y > b.y;
| ^
rail.cpp:20:18: error: 'const struct pla' has no member named 'y'
20 | return a.y > b.y;
| ^
rail.cpp: In function 'bool cmp2(const pla&, const pla&)':
rail.cpp:24:12: error: 'const struct pla' has no member named 'y'
24 | return a.y < b.y;
| ^
rail.cpp:24:18: error: 'const struct pla' has no member named 'y'
24 | return a.y < b.y;
| ^
rail.cpp: In function 'void findLocation(int, int, int*, int*)':
rail.cpp:36:15: error: 'getDistance' was not declared in this scope
36 | dis1[i] = getDistance(0, i);
| ^~~~~~~~~~~
rail.cpp:51:17: error: 'getDistance' was not declared in this scope
51 | dis2[i] = getDistance(sp, i);
| ^~~~~~~~~~~
rail.cpp:65:7: error: 'lef' was not declared in this scope
65 | lef.push_back(i, dis2[i]);
| ^~~
rail.cpp:68:7: error: 'rig' was not declared in this scope
68 | rig.push_back(i, dis1[i]);
| ^~~
rail.cpp:72:8: error: 'rig' was not declared in this scope
72 | sort(rig.begin(), rig.end(), cmp2);
| ^~~
rail.cpp:73:8: error: 'lef' was not declared in this scope
73 | sort(lef.begin(), lef.end(), cmp2);
| ^~~
rail.cpp:76:14: error: expected unqualified-id before 'auto'
76 | for(const &auto inf : rig){
| ^~~~
rail.cpp:76:14: error: expected ';' before 'auto'
76 | for(const &auto inf : rig){
| ^~~~
| ;
rail.cpp:76:23: error: found ':' in nested-name-specifier, expected '::'
76 | for(const &auto inf : rig){
| ^
| ::
rail.cpp:76:19: error: 'inf' has not been declared
76 | for(const &auto inf : rig){
| ^~~
rail.cpp:76:28: error: qualified-id in declaration before ')' token
76 | for(const &auto inf : rig){
| ^
rail.cpp:76:28: error: expected ';' before ')' token
76 | for(const &auto inf : rig){
| ^
| ;
rail.cpp:77:14: error: 'inf' was not declared in this scope; did you mean 'int'?
77 | int n1 = inf.x;
| ^~~
| int
rail.cpp:88:16: error: 'getDistance' was not declared in this scope
88 | int n3 = getDistance(cur, n1);
| ^~~~~~~~~~~
rail.cpp:110:14: error: expected unqualified-id before 'auto'
110 | for(const &auto inf : lef){
| ^~~~
rail.cpp:110:14: error: expected ';' before 'auto'
110 | for(const &auto inf : lef){
| ^~~~
| ;
rail.cpp:110:23: error: found ':' in nested-name-specifier, expected '::'
110 | for(const &auto inf : lef){
| ^
| ::
rail.cpp:110:19: error: 'inf' has not been declared
110 | for(const &auto inf : lef){
| ^~~
rail.cpp:110:28: error: qualified-id in declaration before ')' token
110 | for(const &auto inf : lef){
| ^
rail.cpp:110:28: error: expected ';' before ')' token
110 | for(const &auto inf : lef){
| ^
| ;
rail.cpp:111:14: error: 'inf' was not declared in this scope; did you mean 'int'?
111 | int n1 = inf.x;
| ^~~
| int
rail.cpp:122:16: error: 'getDistance' was not declared in this scope
122 | int n3 = getDistance(cur, n1);
| ^~~~~~~~~~~