i have this code :::
#include<iostream.h>
#include<MTQKSRT.h>
void main (void)
{
threadCount = 0;
threadHandles[300];
threadIDs[300];
apvector<int> mlist(10);
mlist[0] = 34 ;
mlist[1] = 4;
mlist[2] = 54;
mlist[3] = 65;
mlist[4] = 23;
mlist[5] = 1;
mlist[6] = 45;
mlist[7] = 87;
mlist[8] = 67;
mlist[9] = 12;
threadHandles[threadCount] = CreateThread(NULL,0,MTQuickSort((LPVOID)1,mlist,0,mlist.length()-1),(LPVOID)threadCount,0,&threadIDs[threadCount]);
}
#include<apvector.h>
#include<windows.h>
#include<windowsx.h>
#include<winbase.h>
#include<stdlib.h>
#include<stdarg.h>
#include<stdio.h>
#include<math.h>
#include<io.h>
#include<fcntl.h>
HANDLE threadHandles[];
DWORD threadIDs[];
int threadCount; //ini to zero
template <class type>
DWORD WINAPI MTQuickSort(LPVOID data,apvector<type> &list, int start, int end)
{
if (start >= end) // base case (list is sorted)
return ((DWORD)0);
// choose a pivot point
int pivot = list[(start+end)/2];
int leftbound = start;
int rightbound = end;
while (leftbound <= rightbound)
{
// find first element that is greater than pivot on left side
while ((leftbound < end) && (list[leftbound] < pivot))
leftbound++;
// find first element that is smaller than pivot on right side
while ((rightbound > start) && (list[rightbound] > pivot))
rightbound--;
// swap if indexes haven''t crossed
if (leftbound <= rightbound)
{
int temp = list[leftbound];
list[leftbound] = list[rightbound];
list[rightbound] = temp;
leftbound++;
rightbound--;
}
}
threadCount++;
threadHandles[threadCount] = CreateThread(NULL,0,&MTQuickSort(data,list, start, rightbound),(LPVOID)threadCount,0,&threadIDs[threadCount]);
// sort left
threadCount++;
threadHandles[threadCount] = CreateThread(NULL,0,MTQuickSort(data,list, leftbound, end),(LPVOID)threadCount,0,&threadIDs[threadCount]);
// sort right
return ((DWORD)0);
}
and when i compile it says cant convert argument three from unsigned long to unsigned long [__stdcall*][void*]
help please???