Hello, I m facing problem while adding thread in my class. But if I add thread to my main function than it's working fine.

Code that is working fine is

Code:

#include <cstdlib>
#include <stdio.h>
#include "cDqu.h"
#include "cEnq.h"
#include <pthread.h>

void *Fun4Dequeu(void *threadid);

main()
{
pthread_t thdMain;
int t=1;
pthread_create( &thdMain, NULL, Fun4Dequeu, (void *)t);
pthread_join( thdMain, NULL);
exit(0);
}
void *Fun4Dequeu(void *threadid)
{
for(;
{
//Some code;
}
}

But when I am trying to add a thread in my class then it gives me error

Error:
cDqu.h:36: error: argument of type ‘void (cDequeuevoid*)’ does not match ‘void* (*)(void*)’
cDqu.h: At global scope:
cDqu.h:40: error: cannot declare pointer to ‘void’ member

the code for the class is

Code:

#include <cstdlib>
#include <fstream>
#include <time.h>
#include <ctime>
#include <unistd.h>
#include <sys/time.h>
#include <pthread.h>
#include "cEnq.h"
using namespace std;
#ifndef CDQU_H
#define CDQU_H

std:fstream file("output.txt", std::ios_base:ut);
class cDequeue : public cEnqueue
{
public:
pthread_t thdDqueue;

int iThdRet;
cDequeue();
void StartThread2();
void FunGetToken();
void funDequeue(void *threadid);

};
void cDequeue::StartThread2()
{
int t=1;
pthread_create(&thdDqueue,NULL,funDequeue,(void *)t);
/*above line giving problem*/
pthread_join(thdDqueue,NULL);

}
/*below line giving problem*/
void cDequeue::*funDequeue(void *threadid)
{
cEnqueue objEnq;
int Token=0;
if(objEnq.qToken.empty() == false)
{
Token = objEnq.qToken.front();
objEnq.qToken.pop();
}

}
void cDequeue::FunGetToken()
{
int Token=0;
Token = FunDequeue();
if(Token !=0)
file<<"\tToken:"<<Token<<endl;
else
{
file<<"\tQueue Empty!!!"<<endl;
}
}
#endif /* CDQU_H */

Please sugesst me for the same.

Regards,
Hardik