Click to See Complete Forum and Search --> : Thread functions and the 'this' pointer...


exterminator
June 30th, 2005, 01:16 AM
[Andreas]: This question is being asked in regard to the following FAQ (http://www.codeguru.com/forum/showthread.php?t=343480):


Static member functions, which don’t have class scope, do not have this extra parameter. One consequence is that you cannot use a non-static member function as a thread function even if it has the correct prototypeI didnt quite get this point. Its clear that the static member functions dont have "this" pointer and its logical enough. But the conclusion that you are withdrawing from this is not clear to me. Cilu, could you please elaborate a bit?

Thanks and regards,
Exterminator.

Andreas Masur
June 30th, 2005, 01:50 PM
[ Split thread ]

Andreas Masur
June 30th, 2005, 01:52 PM
Take a look at the following FAQ (http://www.codeguru.com/forum/showthread.php?t=312453)...

retry
June 30th, 2005, 05:22 PM
[Andreas]: This question is being asked in regard to the following FAQ (http://www.codeguru.com/forum/showthread.php?t=343480):


I didnt quite get this point. Its clear that the static member functions dont have "this" pointer and its logical enough. But the conclusion that you are withdrawing from this is not clear to me. Cilu, could you please elaborate a bit?

Thanks and regards,
Exterminator.

You are right, this statement is confusing. The thread function has to be global and thats why if its member function of a class, it has to be declared as static to make its scope global.