Quick 'n dirty.
I don't know the exact prototyp for the LPTHREAD_START_ROUTINE,maybe my version is wrong.
Code:
#include <iostream>
#include <windows.h>
#include <conio.h>
using namespace std;
class Foo
{
public:
static void StaticFooThreadFun(void *param)
{
Foo *thisFoo = static_cast<Foo*>(param);
thisFoo->FooThreadFun();
}
void FooThreadFun()
{
while(true)
{
cout << '.';
Sleep(100);
}
}
};
int main()
{
Foo foo;
CreateThread(0,0,
(LPTHREAD_START_ROUTINE)Foo::StaticFooThreadFun,
&foo,0,0);
getch();
}