C++ Threading with Boost Library
<p>I want my function running in a separate thread. I use Boost library and include like this in my <code>main.cpp</code>:</p>

<pre><code>#include &lt;boost/thread.hpp&gt;
#include &lt;boost/date_time/posix_time/posix_time.hpp&gt;
</code></pre>

<p>I want the thread start like this:</p>

<pre><code>boost::thread ethread(Engine::function,info);
// info is an object from the class Engine and i need this in the
// function
</code></pre>

<p>My <code>Engine</code> class is in the <code>func.h</code> and the function looks like this:</p>

<pre><code>void Engine::function(Engine info)
{
    //STUFF
    boost::this_thread::sleep(boost::posix_time::milliseconds(1));
}
</code></pre>

<p>BTW: Is the <code>sleep</code> function for the thread right?</p>

<p>Every time I want to compile it gives me this error:</p>

<pre><code>error C3867: "Engine::function": function call missing argument list; use '&amp;Engine::function' to create a pointer to member
</code></pre>

<p>I tried to use <code>&amp;Engine::function</code> in the thread and this error appears:</p>

<pre><code>error C2064: term does not evaluate to a function taking 2 arguments
</code></pre>

<p>I also tried:</p>

<pre><code>boost::thread ethread(Engine::function,info, _1);
</code></pre>

<p>Then this error appeared:</p>

<pre><code>error C2784: "result_traits&lt;R,F&gt;::type boost::_bi::list0::operator [](const boost::_bi::bind_t&lt;R,F,L&gt; &amp;) const"
</code></pre>

<p>Can someone help me with this? I only want to run the function beside the main thread.</p>