Re: pthreads confusion

"Stephen M. Webb" <[email protected]>
Newsgroups gmane.user-groups.linux.ottawa.general
Organization Xandros Corporation
Message-ID <[email protected]>
On 02/07/09 17:52, Jon Earle wrote:
> I'm trying to create a thread (actually more than one, but just start with
> one for now) that runs a method in another object.  I should this this
> would be relatively straightforward.  I've worked up a code example to
> illustrate the problem (though I get two different reactions [both noted in
> the code snippet below] from the compiler [same call to pthread_create]
> when I compile this vs my real program).

This is a common C++ programming error, especially for C programmers. Pointers 
to member functions are not pointers to functions. 
<http://www.parashift.com/c++-faq-lite/pointers-to-members.html>

The solution is touse a static member function or a namespace-level function 
to forward the call.

-- 
Stephen M. Webb
-- 
OCLUG general discussion list
[email protected]
http://oclug.on.ca/mailman/listinfo/oclug
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.