I'm trying to create a thread from a method that is in the same class as where I'm creating it from.
I have a class called Base that holds a method called Receive(). From the constructor of the Base() class I try to start a new thread that starts the Receive() method.
I tried like this:
std::thread receiveThread(Receive)
but for some reason it throws the error I wrote in the title. It also says "use '&NetworkingLib::Base::Receive' to create a pointer to member
" but when I do that (it does compile) the thread crashes with an abort() error. You might need to know that Receive() does not need arguments and it returns nothing.
Any help appreciated. I can post more code if required.