I've been trying to learn how to use threads, and I'm getting stuck on creating one. I'm having the thread get created in a class constructor like this...
Beacon::Beacon() {
pthread_create(&send_thread,NULL, send, NULL);
}
The send function isn't doing anything yet, but here's what it looks like.
void Beacon::send(void *arg){
//Do stuff
}
Everytime I run the code I get an invalid use of non-static member funciton error. I've tried using &send, and that didn't work. I also had the last NULL parameter set to this, but that didn't work. I've been looking at other example code to try and mimmick it, but nothing seems to work. What am I doing wrong?