I have a code like this:
#include <iostream>
#include <tbb/tbb.h>
#include <Windows.h>
bool MyThread(int something)
{
std::cout << "This is a thread function\n" << std::endl;
for (int i = 0; i < 10000; i++)
{
something++;
Sleep(1);
}
return true;
}
int main ()
{
tbb::tbb_thread pMyThread = tbb::tbb_thread(MyThread, 3);
pMyThread.join();
return 0;
}
But if I compile it in VS 2008 it shows: error C2248: 'tbb::internal::tbb_thread_v3::tbb_thread_v3' : cannot access private member declared in class 'tbb::internal::tbb_thread_v3'
for the first string of main() function. Where am I wrong?