Can someone please help!!! I am trying to finish an assignment, I need to write code to do the matrix problem, BUT each time in a seperate thread. This must use Win32 version. What I have so far doesnt seem to work... any help would be soooo appreciated! I have this so far:

Code:#include <stdio.h> #include <stdlib.h> #include <windows.h> /* calculate a matrix, create a pointer */ void matrix(int **a){ int i; int j; for (i = 0; i < 6; i++){ for (j = 0; j < 6; j++){ printf("%d", a[i][j]); } printf("\n"); } }; int main(){ DWORD ThreadId; HANDLE ThreadHandle; int Param; int i; int j; int **a; //pointer /* allocate memory for 6x6 matrix */ a=(int**)malloc(6*sizeof(int*)); /* while criteria is met for 6x6 matrix*/ for (i = 0; i < 6; i++){ for (j = 0; j < 6; j++){ ThreadHandle = CreateThread(NULL, 0, matrix, &Param, 0, &ThreadId); if (ThreadHandle != NULL) { WaitForSingleObject(ThreadHandle, INFINITE); CloseHandle(ThreadHandle); } a=(int**)malloc(6*sizeof(int*)); a[i][j] = i; } } }