I'm new to c++, I'm trying to find main diagonal matrix using pointer array like
int * ProblemSolution :: solution(int *A,int N)
{
//write your code here
for (int m=0;m<N;m++){
for (int x=0;x<N;x++){
if(m=x)
cout<<*(*(A+m)+x)<<",";
}
}
return 0;
}
but i'm getting some kind of error:

can anyone help me?