To return an int from a posix thread you would Do
void* myfunc(void *args)
{
int *result = (int *) malloc(size of(int));
...
*result= 3;
return result;
}
void main()
{
int *received;
...
pthread_join(thread_var,&received);
std::cout<< "thread int val: "<<*received;
}
How about if it were a paired vector as such
vector<pair<int,string>>
;