longesttrip.cpp: In function 'std::pair<int, int> getpos(std::vector<int>, std::vector<int>)':
longesttrip.cpp:21:14: error: 'mid' was not declared in this scope; did you mean 'mid1'?
21 | for(int i=mid+1;i<(int)A.size();i++){
| ^~~
| mid1
longesttrip.cpp: In function 'std::vector<int> longest_trip(int, int)':
longesttrip.cpp:81:49: error: too few arguments to function 'bool are_connected(std::vector<int>, std::vector<int>)'
81 | if(are_connected(vector<int>(1,Line2.back())),vector<int>(1,j)){
| ^
In file included from longesttrip.cpp:2:
longesttrip.h:5:6: note: declared here
5 | bool are_connected(std::vector<int> A, std::vector<int> B);
| ^~~~~~~~~~~~~
longesttrip.cpp:123:49: error: too few arguments to function 'bool are_connected(std::vector<int>, std::vector<int>)'
123 | if(are_connected(vector<int>(1,Line2.back())),vector<int>(1,j)){
| ^
In file included from longesttrip.cpp:2:
longesttrip.h:5:6: note: declared here
5 | bool are_connected(std::vector<int> A, std::vector<int> B);
| ^~~~~~~~~~~~~
longesttrip.cpp:127:54: error: too few arguments to function 'bool are_connected(std::vector<int>, std::vector<int>)'
127 | else if(are_connected(vector<int>(1,Line1.back())),vector<int>(1,j)){
| ^
In file included from longesttrip.cpp:2:
longesttrip.h:5:6: note: declared here
5 | bool are_connected(std::vector<int> A, std::vector<int> B);
| ^~~~~~~~~~~~~
longesttrip.cpp:142:47: error: too few arguments to function 'bool are_connected(std::vector<int>, std::vector<int>)'
142 | if(are_connected(vector<int>(1,Line1.back())),vector<int>(1,Line2.back())){
| ^
In file included from longesttrip.cpp:2:
longesttrip.h:5:6: note: declared here
5 | bool are_connected(std::vector<int> A, std::vector<int> B);
| ^~~~~~~~~~~~~
longesttrip.cpp:150:52: error: too few arguments to function 'bool are_connected(std::vector<int>, std::vector<int>)'
150 | else if(are_connected(vector<int>(1,Line1.back())),vector<int>(1,Line2[0])){
| ^
In file included from longesttrip.cpp:2:
longesttrip.h:5:6: note: declared here
5 | bool are_connected(std::vector<int> A, std::vector<int> B);
| ^~~~~~~~~~~~~
longesttrip.cpp:157:48: error: too few arguments to function 'bool are_connected(std::vector<int>, std::vector<int>)'
157 | else if(are_connected(vector<int>(1,Line1[0])),vector<int>(1,Line2.back())){
| ^
In file included from longesttrip.cpp:2:
longesttrip.h:5:6: note: declared here
5 | bool are_connected(std::vector<int> A, std::vector<int> B);
| ^~~~~~~~~~~~~
longesttrip.cpp:164:48: error: too few arguments to function 'bool are_connected(std::vector<int>, std::vector<int>)'
164 | else if(are_connected(vector<int>(1,Line1[0])),vector<int>(1,Line2[0])){
| ^
In file included from longesttrip.cpp:2:
longesttrip.h:5:6: note: declared here
5 | bool are_connected(std::vector<int> A, std::vector<int> B);
| ^~~~~~~~~~~~~
longesttrip.cpp:186:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
186 | for(int i=0;i<Line2.size();i++){
| ~^~~~~~~~~~~~~
longesttrip.cpp:208:1: warning: control reaches end of non-void function [-Wreturn-type]
208 | }
| ^