Hello.
Today I started looking into using sf::Thread. I've made a class that has an sf::Thread, which is initialized in the constructor. My question is, if the function that runs in that thread has parameters, how would I pass them in?
class ClassWithThread{
public:
ClassWithThread()
:mThread(&ClassWithThread::FunctionToUse, this){ //How would I pass the int into that function?
}
void FunctionToUse(int x);
private:
sf::Thread mThread;
};
I'm not sure if this is an issue with me not understanding sf::Thread properly, or if it's something I simply can't do.
Thanks in advance for any help.
EDIT: I thought it would be prudent to mention that I'm using SFML 2.1 and Visual Studio Community