What is error? error

#include
using namespace std;
bool IsSorted(int *a,int n)
{
if(n==0 || n==1)
return 1;

if(a[n-1]  < a[n-2])
	return 0;
return IsSorted(a,n-1);

}
int main()
{
int n;
cin>>n;
int a[n];
for(int i=0;i<n;i++)
{
cin>>a[i];
}

if(IsSorted(a,n))
	cout<<"True"<<endl;
else
	cout<<"False"<<endl;	
return 0;

}

Save your code on ide.codingblocks.com and then share its link.

there is no error in the above code,it is working fine in codeblocks ide .

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.