sorting.cpp: In function 'int check(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:12:34: warning: unused parameter 'M' [-Wunused-parameter]
12 | int check(int stop, int S[], int M, int X[], int Y[], int P[], int Q[]){
| ~~~~^
sorting.cpp: In function 'int findSwapPairs(int, int*, int, int*, int*, int*, int*)':
sorting.cpp:78:7: warning: declaration of 'tt' shadows a previous local [-Wshadow]
78 | int tt=(l+r)/2;
| ^~
sorting.cpp:76:15: note: shadowed declaration is here
76 | int l=-1,r=n,tt;
| ^~
sorting.cpp:79:17: error: invalid conversion from 'int*' to 'int' [-fpermissive]
79 | if(check(tt,S,X,Y,P,Q)!=-1){
| ^
| |
| int*
sorting.cpp:79:24: error: too few arguments to function 'int check(int, int*, int, int*, int*, int*, int*)'
79 | if(check(tt,S,X,Y,P,Q)!=-1){
| ^
sorting.cpp:12:5: note: declared here
12 | int check(int stop, int S[], int M, int X[], int Y[], int P[], int Q[]){
| ^~~~~
sorting.cpp:86:16: error: too few arguments to function 'int check(int, int*, int, int*, int*, int*, int*)'
86 | return check(r);
| ^
sorting.cpp:12:5: note: declared here
12 | int check(int stop, int S[], int M, int X[], int Y[], int P[], int Q[]){
| ^~~~~
sorting.cpp:76:15: warning: unused variable 'tt' [-Wunused-variable]
76 | int l=-1,r=n,tt;
| ^~