Main.cc:3:7: error: ‘N’ does not name a type const N=10010; ^ Main.cc:4:7: error: ‘N’ was not declared in this scope int a[N],n,m; ^ Main.cc:6:1: error: expected ‘,’ or ‘;’ before ‘int’ int search(int l,int r,int x) ^~~ Main.cc: In function ‘int main()’: Main.cc:19:28: error: ‘a’ was not declared in this scope for(int i=1;i<=n;i++)cin>>a[i]; ^ Main.cc:20:7: error: ‘x’ was not declared in this scope cin>>x; ^