C
cerr
hi There,
I'm just trying to write a little sample program with a thread. I can't getmy thread started and am not sure why, I get
$ g++ -o example example.cpp
example.cpp: In member function ‘int MyThread::StartMe()’:
example.cpp:42:59: error: expected primary-expression before ‘void’
example.cpp:42:63: error: initializer expression list treated as compound expression
the code:
int MyThread::StartMe(void)
{
int pthread_create(&ThreadA, NULL, &MyThread:rintMsg, void);
}
//-------------------------------------------------------------
void MyThread:rintMsg(void)
{
cout << "I Incremented count: " << count << endl;
}
Can anyone point it out? I'm like HUH???
Thanks,
I'm just trying to write a little sample program with a thread. I can't getmy thread started and am not sure why, I get
$ g++ -o example example.cpp
example.cpp: In member function ‘int MyThread::StartMe()’:
example.cpp:42:59: error: expected primary-expression before ‘void’
example.cpp:42:63: error: initializer expression list treated as compound expression
the code:
int MyThread::StartMe(void)
{
int pthread_create(&ThreadA, NULL, &MyThread:rintMsg, void);
}
//-------------------------------------------------------------
void MyThread:rintMsg(void)
{
cout << "I Incremented count: " << count << endl;
}
Can anyone point it out? I'm like HUH???
Thanks,