Explain the error in this code

#include
using namespace std;

int findmax(int ptr,int n)
{
int i,max=
(ptr);
for(i=0;i<n;i++)
{
if(max<(ptr+i))
max=
(ptr+i);
}
delete []ptr;
return max;
}
int main() {

int n;
cout<<“enter the no. of items”<<endl;
cin>>n;
int *ptr=new int[n];
int temp,i;
cout<<“enter elements”
for(i=0;i<n;i++)
{
cin>>temp;
*(ptr+i)=temp;
}
int item=findmax(ptr,n);
cout<<“max value”<<item;
return 0;

}

@hs9177222
Except for the part that you are missing a semicolon after the statement
cout << “enter elements”
there are no other errors in your code. It is working fine.