CRS
CRS

Reputation: 837

SDL multi threading

I am trying to make a program in C++ that sorts 100 numbers or so with merge sort by using multi threading with SDL. first of all this is what my program errors when i first make the thread...

SDL_Thread *threadA = SDL_CreateThread(MergeSort, "B", (vector<int> *)NULL);

and this is the function prototype:

void MergeSort(vector<int> & A)

if i can get this or if anyone knows of any simple multi threading tutorials on SDL it would help, thanks

Upvotes: 0

Views: 2435

Answers (1)

David Brown
David Brown

Reputation: 13526

The function passed to SDL_CreateThread must have the prototype int ()(void*). That is, a function taking a single void* parameter and returning an integer. See the documentation here.

Upvotes: 2

Related Questions