Please Tell error

#include <bits/stdc++.h>
using namespace std;

int displayMatrix(int **mat,int N);
int rotateMatrix(int **mat,int N)
{
for (int x = 0; x < N / 2; x++)
{
for (int y = x; y < N-x-1; y++)
{
int temp = mat[x][y];
mat[x][y] = mat[y][N-1-x];

		mat[y][N-1-x] = mat[N-1-x][N-1-y];
		mat[N-1-x][N-1-y] = mat[N-1-y][x];
		mat[N-1-y][x] = temp;
	}
}

}

int displayMatrix(int **mat,int N)
{
for (int i = 0; i < N; i++)
{
for (int j = 0; j < N; j++)
printf("%2d ", mat[i][j]);

	printf("\n");
}
printf("\n");

}

int main()
{
int N;
cin>>N;
int mat[N][N];

for(int i=0;i<N;i++){
    for(int j=0;j<N;j++){
        cin>>mat[i][j];
    }
}

rotateMatrix(mat,N);

displayMatrix(mat,N);

return 0;

}

Please run your code on https://ide.codingblocks.com and share the link

annot convert ‘int (*)[N]’ to ‘int**’ for argument ‘1’ to ‘void displayMatrix(int**, int)’ displayMatrix(mat,N);

what is meaning of this error? annot convert ‘int (*)[N]’ to ‘int**’ for argument ‘1’ to ‘void displayMatrix(int**, int)’ displayMatrix(mat,N);

It means there is an issue in passing the 2-D matrix. Please make mat[N][N] a global variable, that way you won’t have to pass it to the function. Declare it with max possible size of N.

please tell error https://codeshare.io/5R1oyE .please correct my code. I unable to implemet your solution

I think you have shared the wrong code link

https://ide.codingblocks.com/s/187672 Please take a look at this implementation

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.