I am trying to create a function that returns an object with certain type. The problem is that create thread does not accept it. Can somebody help me with the following code?

```
struct thread_args
 {
    Key *k;
    QNode *q;
    uint8_t USED_DIMENSION;
};

QLeafNode *st ;
  struct thread_args Structthread2;
     Structthread1.k=min;
     Structthread1.q=start;
      Structthread1.USED_DIMENSION=4 ;

pthread_create( &thread1, NULL,(void*)&FindLeafNode,  ((void *) &Structthread1));
pthread_join( thread1, (void**)st);

QLeafNode* FindLeafNode (Key *k, QNode * r, uint8_t USED_DIMENSION ){

}

```