Main.cc: In function ‘long int KQ(int*, int)’:
Main.cc:17:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
Main.cc: In function ‘int main()’:
Main.cc:20:18: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long int*’ [-Wformat=]
scanf("%d",&n);
~~^
Main.cc:24:11: error: cannot convert ‘long int*’ to ‘int*’ for argument ‘1’ to ‘long int KQ(int*, int)’
KQ(a,n);
^
Main.cc:20:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
Main.cc:22:14: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%ld",&a[i]);
~~~~~^~~~~~~~~~~~~