שאלה בנוגע ל thread
התכנית
התכנית
#include <conio.h> #include <stdio.h> #include <process.h> int repeat = 1; void OutputThread(void* pArguments) { while(repeat) { printf("*"); } } void InputThread(void* pArguments) { char ch = getch(); repeat = 0; // for stopping } int main() { _beginthread(InputThread, 0, NULL); _beginthread(OutputThread, 0, NULL); //_endthread(); return 0; } עכשיו לא ברור לי היכן למקם את ה
_endthread
והאם לכל beginthread צריך endthread משלו ואם כן אז איך לשייך ל thread מסויים ?_endthread