I'm learning C++ and I'm currently working on a program with two concurrent threads. In the debug window in Visual Studio, it's always telling me that:
The thread x has exited with code 0 (0x0).
I want to return an exit code from my thread so that visual studio can display the exit code in the console like it does with these other threads. I've tested it, and just returning an int
from the thread function doesn't change anything about the output of Visual Studio. It still says that the thread in question exited with code 0.
I've also googled it, and I can't find anything about how to do it (at least not with thread.h
).
It's not a big deal if it isn't possible, because I can always return a value from the thread and mirror it in the process exit code, but if it isn't possible, then what is this exit code stuff I'm seeing in the debug window?