I am using SFML 1.6 and trying to implement a simple thread as in the following code
#include <SFML\Graphics.hpp>
#include <iostream>
using namespace std;
using namespace sf;
void THreadFunc()
{
...
}
int main()
{
RenderWindow window(VideoMode(800,600,32), "Box2D");
Event events;
Thread thread(&THreadFunc);
while(window.IsOpened())
{
while(window.GetEvent(events))
{
}
...
window.Clear();
window.Draw(sp);
window.Display();
}
return EXIT_SUCCESS;
}
Now during initialization
Thread thread(&THreadFunc);
I get the following error
Error 3 error C2664: 'sf::Thread::Thread(sf::Thread::FuncType,void *)' : cannot convert parameter 1 from 'void (__cdecl *)(void)' to 'sf::Thread::FuncType'
Can anyone help??