I hope creating several discussions in a short time period is not regarded as an abuse. I have another question, codeproject.com forums are down and I have nowhere to go for help.
I'm looking to find out how you can start a new thread in c++ and check back later to see if the thread is done working and pick up the result. The internet example I found looks a lot like running a function in the same thread rather then a new thread
(I modified the example to fit what I need)
void foo(int A, int B, int * Result)
{
* Result = A + B;
}
int main()
{
int Result;
thread th1(foo, 3,4,&Result);
th1.join(); // I don't want to wait;
cout << "work done the result is ";
cout << Result;
}