I try to use a SFML Thread in my game, but I got a problem with it. My code:
void MyGame::endGame()
{
sf::Thread thread(&PuzzleGame::endThread);
thread.Launch();
}
void MyGame::endThread()
{
}
As a result I get:
../src/MyGame.cpp: In member function ‘void MyGame::endGame()’:
../src/MyGame.cpp:186:51: error: no matching function for call to ‘sf::Thread::Thread(void (MyGame::*)())’
sf::Thread thread(&MyGame::endThread);
^
What can be a problem?
EDIT I use SFML 1.6