I am playing around with pthreads. This program how ever blows up.
using namespace std;
void * myProc(void *arg)
struct myStruct* str = new struct myStruct();
str->a = 10;
int main(int argc, char **argv)
int status ;
struct myStruct* m_str;
status = pthread_create(&mythr,NULL,myProc,NULL);
status = pthread_join(mythr,&retVal);
m_str = (struct myStruct*)m_str;
cout<<"retval is "<<m_str->a<<" "<<endl;
Can a structure be returned by a thread as its return value ?