Can somebody help with this code:
Task: Square matrix clockwise rotation using 2*N Threads 1)first quater i.e N/2 (4,7)->(11,6) ..2) second quater (11,16)->(10,13),so on and so forth...
Thanks,
Mozala

Input matrix 4x4

1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16

Matrix 4x4 after rotation:

13 2 3 1
5 10 6 8
9 11 7 12
16 14 15 4

Code:
```#include <pthread.h>
#include <iostream>
#define MAX_ROW 10
#define MAX_COL 10
using namespace std;

struct matrix_index_type
{
int	row;
int  col;
};

struct matrix_index_type matrix_index[MAX_ROW][MAX_COL];
int aux[MAX_COL];
int matrix[MAX_ROW][MAX_COL];

{
int i,j;
for(i = 0; i < MAX_ROW; i ++)
{
for(j = 0; j < MAX_COL; j ++)
{
cin<<matrix[i][j];

}
}
}

/*--------------PRINT OUT MATRIX-------------------*/
output_matrix(int matrix[][MAX_COL])
{
int i,j;
for(i = 0; i < MAX_ROW; i ++)
{
for(j = 0; j < MAX_COL; j ++)
{
cout<<matrix[i][j]<<endl;

}
cout<<"\n";
}
cout<<"Finished printing.."<<endl;
}
/*---------------------Rotate---------------------*/
void *rotate( void * index)
{
int i,j,x;
struct matrix_index_type *pindex;
pindex = (struct matrix_index_type *) index;
i = pindex->row;
j = pindex->col;

aux[MAX_COL]=matrix[i][j];

aux[MAX_COL]=matrix[i][j];

for (x=0;x<MAX_COL;x++)
{

}
}

/*-------------------MAIN PROGRAM-----------------*/
int main()

{

int Imatrix[][MAX_COL]={1,2,3,4},{5,6,7,8},{9,10,11,12},{13,14,15,16};
int i, j;
int index[MAX_ROW][MAX_COL];

cout<<"Input matrix is:\n"<<endl;
output_matrix(Imatrix);

for(i = 0; i < MAX_ROW; i ++)
{
for(j = 0; j < MAX_COL; j ++)
{
matrix_index[i][j].row = i;
matrix_index[i][j].col = j;
}

}
for(i = 0; i < MAX_ROW; i ++)
{
for(j = 0; j < MAX_COL; j ++)
{

}

}
cout<<"Rotated matrix is:\n";
output_matrix(Imatrix);
}