Добавил:
Studfiles2
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Быстрая сортировка / quicksort
.cpp// quicksort.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <windows.h>
#include <iostream>
#include <stdlib.h>
#include "mf.h"
#include "constantes.h"
const unsigned int L = 10;
//unsigned int N = 0;
int main(int argc, char* argv[])
{
int i;
HANDLE h;
DWORD Id = 0;
using namespace::std;
srand(4);
double array[L] = {2, 2, 3, 1, 2, 1, 1, 1};
for (i = 0; i < L; i++)
{
array[i] = rand()%50;
cout << array[i]<<" ";
}
cout << endl;
sortarray(array, L);
for (i = 0; i < L; i++)
cout << array[i]<<" ";
LPRECORD Param = new RECORD;
Param->data = array;
Param->size = L;
void * Param1 = (VOID *) Param;
h = CreateThread(NULL, 0, ThSort, Param1, 0, &Id);
return 0;
}
Соседние файлы в папке Быстрая сортировка