When I learned about multithreading in C++, one of the first things was that while heap is shared, each thread has its own stack and it's impossible to access another thread's stack.
So I wrapped the variables into a static class and passed its address to another thread. And it worked.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.