<?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[Threads im Bezug auf Klassen]]></title><description><![CDATA[<p>sodelle hab eine klasse deklariert wie hier:</p>
<pre><code class="language-cpp">class CIRC
{
public:
	void StartThread(void);

private:
	DWORD WINAPI ServerThread(LPVOID lpNothing);
};
</code></pre>
<p>und ich möchte nun einen thread per winapi innerhalb von StartThread starten. als funktion dafür die ServerThread.</p>
<pre><code class="language-cpp">void CIRC::StartThread(void)
{	
	CreateThread(0, 0, &amp;CIRC::ServerThread, 0, 0, 0);
}
</code></pre>
<p>allerdings geht das so nicht, bekomme compilerfehler:<br />
error C2440: 'initializing' : cannot convert from 'DWORD (__stdcall CIRC::* )(LPVOID)' to 'DWORD'</p>
<p>kann mir bitte jemand helfen dieses problem zu umgehen?</p>
<p>danke im voraus</p>
<p>MfG RadiatioN</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/149743/threads-im-bezug-auf-klassen</link><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Sep 2026 08:33:53 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/149743.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 08 Jun 2006 21:26:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Threads im Bezug auf Klassen on Thu, 08 Jun 2006 21:26:22 GMT]]></title><description><![CDATA[<p>sodelle hab eine klasse deklariert wie hier:</p>
<pre><code class="language-cpp">class CIRC
{
public:
	void StartThread(void);

private:
	DWORD WINAPI ServerThread(LPVOID lpNothing);
};
</code></pre>
<p>und ich möchte nun einen thread per winapi innerhalb von StartThread starten. als funktion dafür die ServerThread.</p>
<pre><code class="language-cpp">void CIRC::StartThread(void)
{	
	CreateThread(0, 0, &amp;CIRC::ServerThread, 0, 0, 0);
}
</code></pre>
<p>allerdings geht das so nicht, bekomme compilerfehler:<br />
error C2440: 'initializing' : cannot convert from 'DWORD (__stdcall CIRC::* )(LPVOID)' to 'DWORD'</p>
<p>kann mir bitte jemand helfen dieses problem zu umgehen?</p>
<p>danke im voraus</p>
<p>MfG RadiatioN</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1074218</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1074218</guid><dc:creator><![CDATA[Radiation2K5]]></dc:creator><pubDate>Thu, 08 Jun 2006 21:26:22 GMT</pubDate></item><item><title><![CDATA[Reply to Threads im Bezug auf Klassen on Thu, 08 Jun 2006 22:32:25 GMT]]></title><description><![CDATA[<p>hab nochmals rumprobiert und bin dann selbst draufgekommen, einfach in deklaration als static und dem thread pointer auf klasse mitgeben <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="😃"
    /></p>
<p>MfG RadiatioN</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1074244</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1074244</guid><dc:creator><![CDATA[Radiation2K5]]></dc:creator><pubDate>Thu, 08 Jun 2006 22:32:25 GMT</pubDate></item></channel></rss>