Aah, since you didn't specify what error you got, let me guess...
[tt]no match for `CWinThread& = CWinThread*&' operator
candidates are: CWinThread& CWinThread:perator=(const CWinThread&)[/tt]
Or something like that, depending on what brand of compiler you use.
The problem is in the first line, where you make an array of CWinThread objects. thr is a pointer to the first element of that array.
Then in the second line, the expression thr[ignore][1][/ignore] is a reference to the array element. The error is that you're trying to assign a CWinThread* to a CWinThread, because AfxBeginThread returns a CWinThread* that points to an object that it initialized.
What you probably want is instead to have an array of pointers. The first line should become CWinThread **thr = new CWinThread* [ignore][5][/ignore];
That way, type of thr[1] is CWinThread* rather than CWinThread.
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.