<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[boost::thread]]></title><description><![CDATA[<p>hi<br />
habe eine funktion geschrieben, die einen socket als parameter nimmt.<br />
void TestFunk(SOCKET s)</p>
<p>wenn ich die jetzt in einem thread laufen lassen will:<br />
boost::thread t1(&amp;TestFunk(s));<br />
bekomme ich den fehler: error:c2102:'&amp;' erwartet L-Wert<br />
woran liegt das? habe leider nichts zur thread-syntax bei funktionen mit parameter gefunden.<br />
gruß<br />
ebro</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/124517/boost-thread</link><generator>RSS for Node</generator><lastBuildDate>Mon, 24 Aug 2026 01:37:24 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/124517.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 28 Oct 2005 09:51:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to boost::thread on Fri, 28 Oct 2005 09:51:43 GMT]]></title><description><![CDATA[<p>hi<br />
habe eine funktion geschrieben, die einen socket als parameter nimmt.<br />
void TestFunk(SOCKET s)</p>
<p>wenn ich die jetzt in einem thread laufen lassen will:<br />
boost::thread t1(&amp;TestFunk(s));<br />
bekomme ich den fehler: error:c2102:'&amp;' erwartet L-Wert<br />
woran liegt das? habe leider nichts zur thread-syntax bei funktionen mit parameter gefunden.<br />
gruß<br />
ebro</p>
]]></description><link>https://www.c-plusplus.net/forum/post/902584</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/902584</guid><dc:creator><![CDATA[ebrosius]]></dc:creator><pubDate>Fri, 28 Oct 2005 09:51:43 GMT</pubDate></item><item><title><![CDATA[Reply to boost::thread on Fri, 28 Oct 2005 10:30:23 GMT]]></title><description><![CDATA[<p>Du mußt dich allgemein mit Funktions-Pointern und Funktions-Objekten beschäftigen. Du mußt einen Binder benutzen, um zus. parameter anzugeben. Das wird auch in der C++ Std-Lib so gelebt (beschäftige dich auch mal damit!) und das kann man auch in Boost bzw. boost::thread anwenden.</p>
<p>Kannst den binder von boost benutzen:<br />
<a href="http://www.boost.org/libs/bind/bind.html" rel="nofollow">http://www.boost.org/libs/bind/bind.html</a></p>
<p>Aber der aus der C++ Std-Lib geht auch.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/902619</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/902619</guid><dc:creator><![CDATA[Artchi]]></dc:creator><pubDate>Fri, 28 Oct 2005 10:30:23 GMT</pubDate></item><item><title><![CDATA[Reply to boost::thread on Fri, 28 Oct 2005 10:34:07 GMT]]></title><description><![CDATA[<p>dank dir artchi, auf deine antwort hab ich gehofft <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/902624</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/902624</guid><dc:creator><![CDATA[ebrosius]]></dc:creator><pubDate>Fri, 28 Oct 2005 10:34:07 GMT</pubDate></item><item><title><![CDATA[Reply to boost::thread on Sat, 29 Oct 2005 20:02:57 GMT]]></title><description><![CDATA[<p>ich kriegs nich hin <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /><br />
also habe diese funktion:</p>
<p>void TestFunk(SOCKET s)<br />
{<br />
.<br />
.<br />
.<br />
send(s, Ausgabe, strlen(Ausgabe),0);<br />
}<br />
die ich in einem thread laufen lassen will. wie genau funktioniert das mit bind? werde dauraus nicht so ganz schlau.<br />
so etwa?<br />
boost::thread t1(&amp;bind(TestFunk,s));<br />
bitte noch etwas mehr hilfe <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/903587</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/903587</guid><dc:creator><![CDATA[ebrosius]]></dc:creator><pubDate>Sat, 29 Oct 2005 20:02:57 GMT</pubDate></item><item><title><![CDATA[Reply to boost::thread on Sat, 29 Oct 2005 20:47:07 GMT]]></title><description><![CDATA[<p>Also so müsste es eigentlich funktionieren:</p>
<pre><code class="language-cpp">boost::thread t1(boost::bind(TestFunk, s));
</code></pre>
<p>Du mußt das &amp; weg lassen! Und haste bind auch aus dem boost-Namespace benutzt? Bzw. using namespace boost?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/903604</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/903604</guid><dc:creator><![CDATA[Artchi]]></dc:creator><pubDate>Sat, 29 Oct 2005 20:47:07 GMT</pubDate></item><item><title><![CDATA[Reply to boost::thread on Sat, 29 Oct 2005 21:44:07 GMT]]></title><description><![CDATA[<p>hab jetzt erstma boost neu inst. mit meiner version vc7<br />
welche .hpp muss ich nehmen, und woher weiß ich das, dass nächste mal?<br />
hab die mal ausprobiert:<br />
#include &lt;boost/bind/bind_mf_cc.hpp&gt; -- error c2653: '_bi' :keine klasse oder namespace.<br />
#include &lt;boost/bind/bind_template.hpp&gt; -- error c2899: der typname kann nicht ausserhalb einer vorlagendeklaration verwendet werden.<br />
#include &lt;boost/bind/bind_cc.hpp&gt; --- errorc2653...</p>
<p>using namespace boost; hab ich auch drin</p>
]]></description><link>https://www.c-plusplus.net/forum/post/903628</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/903628</guid><dc:creator><![CDATA[ebrosius]]></dc:creator><pubDate>Sat, 29 Oct 2005 21:44:07 GMT</pubDate></item><item><title><![CDATA[Reply to boost::thread on Sun, 30 Oct 2005 08:02:13 GMT]]></title><description><![CDATA[<p>Steht auf der Doku von bind ganz oben rechts, welche Header man nehmen muß!</p>
<pre><code class="language-cpp">#include &lt;boost/bind.hpp&gt;
</code></pre>
<p>Immer boost als Verzeichnis, und dann meistens immer der Klassenname plus .hpp. Selten das es anders ist, aber das steht dann auch extra in der Doku drin. Weiterhin findet man es auch in den detailierteren Informationen der Doku:</p>
<p><a href="http://www.boost.org/libs/bind/bind.html#Implementation" rel="nofollow">http://www.boost.org/libs/bind/bind.html#Implementation</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/903678</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/903678</guid><dc:creator><![CDATA[Artchi]]></dc:creator><pubDate>Sun, 30 Oct 2005 08:02:13 GMT</pubDate></item><item><title><![CDATA[Reply to boost::thread on Sun, 30 Oct 2005 09:54:34 GMT]]></title><description><![CDATA[<p>ups...größer hätte es fast garnicht da stehen können.<br />
funktioniert jetzt alles wunderbar <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /><br />
jetzt wo das problem vom tisch ist werd ich mich erstmal ausführlicher mit boost beschaftigen.<br />
vielen dank artchi!!! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/903718</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/903718</guid><dc:creator><![CDATA[ebrosius]]></dc:creator><pubDate>Sun, 30 Oct 2005 09:54:34 GMT</pubDate></item></channel></rss>