I'm having the following error in this code:
#define TAM 10000 /*Tamanho do vetor*/
#define NUM 10000 /*base para gerador de numeros aleatorios*/
using std::cout;
using std::cin;
using std::endl;
pthread_t thread[TAM];
void gerarVet(long*);
void bucketSort(long*);
void imprimaVet(long*);
int main(){
long vet[TAM],tinicio,tfim,tempo, i, Troca=0;
long rt1, rt2;
tinicio=time(NULL);
gerarVet(vet);
//imprimaVet(vet);
do {
Troca = 0;
for(i = 0; i < TAM; i+=2)
{
pthread_t t = thread[i];
rt1 = pthread_create(&t, NULL, bucketSort(vet), (void*) &i);
}
for(i = 0; i < TAM; i+=2)
pthread_join(thread[i], NULL);
Troca = 0;
for(i = 1; i < TAM; i+=2)
{
pthread_t t = thread[i];
rt2 = pthread_create(&t, NULL, bucketSort(vet), (void*)&i);
}
for(i = 1; i < TAM; i+=2)
pthread_join(thread[i], NULL);
} while(Troca == 1);
//bucketSort(vet);
imprimaVet(vet);
Error message:
39 79 C: [Error] invalid use of void expression
49 61 C: [Error] invalid use of void expression