where does the number returned by the thread function goes???
Printable View
where does the number returned by the thread function goes???
This is platform dependent.
In windows you can use the GetExitCodeThread Function to retreave the return value.
Hope this helps.
I'll have to try it but it seems like the right function.
for future reference I want to know the return value cause what I'm doing is returning an address to a variable I need to use in the main;
now in main:Code:unsigned __stdcall foos(void *param)
{
char *fName=(char*)param;
ifstream in(fName);
int *ret=getStatistics(in);
return reinterpret_cast<unsigned>(ret);
}
uintptr_t th1=_beginthreadex(NULL,0,foo1,NULL,0,NULL);
int *stat=reinterpret_cast<int*>(getreturn(th1));//getreturn fictional function just to illustrate my intentions
thanks "couling"