Alright so I've been reading up on threads and how to code them and I am stumped. I have been given an aissgnment to create a main thread which then creates two child threads. The program must show the threads were created and when they are terminated. Here is my program so far:
When I run the program, it sghows that a main thread and 2 children thread have been created however it only shows the second child thread and the main thread terminate, not the first one. Does anyone see a problem with my code? Any input would be greatly appreciated. Thanks.
ok... both child threads are setting child and you wait for them both to end, then cout the one that set child last... do you see the problem?
-- edit... plus, it should be int main() and you are setting all these HANDLE vars, but not using them, is that for later? plus you need #include <cstdio> for getchar();