<?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[Funktiospointer]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich habe ein kleines Problem. Ich habe zwar die alten Beiträge durchsucht, aber nicht passendes gefunden. Hier der Code:</p>
<pre><code>class currentdens
{
public:
[..]
currentdens();
double F(double z,gsl_complex t);
double fF(double t, void* p);
double* peaks(double numz,double numpl,double numpr);
};

[...]
double* currentdens::peaks(double numz,double numpl,double numpr)
{
[...]
	gsl_function F;

	F.function = &amp;fF;
[...]
}
</code></pre>
<p>Ich erhalte dann aber folgende Fehlermeldung:</p>
<pre><code>s_a_pos_dep.cpp(241): error: a value of type &quot;double (currentdens::*)(double, void *)&quot; cannot be assigned to an entity of type &quot;double (*)(double, void *)&quot;
        F.function = &amp;fF;
                   ^
</code></pre>
<p>Hat jemand von euch eine Idee, wie ich das lösen könnte?</p>
<p>Danke,<br />
Markus</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/213321/funktiospointer</link><generator>RSS for Node</generator><lastBuildDate>Wed, 14 Oct 2026 10:13:37 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/213321.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 16 May 2008 12:53:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Funktiospointer on Fri, 16 May 2008 12:53:47 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich habe ein kleines Problem. Ich habe zwar die alten Beiträge durchsucht, aber nicht passendes gefunden. Hier der Code:</p>
<pre><code>class currentdens
{
public:
[..]
currentdens();
double F(double z,gsl_complex t);
double fF(double t, void* p);
double* peaks(double numz,double numpl,double numpr);
};

[...]
double* currentdens::peaks(double numz,double numpl,double numpr)
{
[...]
	gsl_function F;

	F.function = &amp;fF;
[...]
}
</code></pre>
<p>Ich erhalte dann aber folgende Fehlermeldung:</p>
<pre><code>s_a_pos_dep.cpp(241): error: a value of type &quot;double (currentdens::*)(double, void *)&quot; cannot be assigned to an entity of type &quot;double (*)(double, void *)&quot;
        F.function = &amp;fF;
                   ^
</code></pre>
<p>Hat jemand von euch eine Idee, wie ich das lösen könnte?</p>
<p>Danke,<br />
Markus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1510472</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1510472</guid><dc:creator><![CDATA[mkph]]></dc:creator><pubDate>Fri, 16 May 2008 12:53:47 GMT</pubDate></item><item><title><![CDATA[Reply to Funktiospointer on Fri, 16 May 2008 12:55:36 GMT]]></title><description><![CDATA[<p>fF static machen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1510475</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1510475</guid><dc:creator><![CDATA[sothis_]]></dc:creator><pubDate>Fri, 16 May 2008 12:55:36 GMT</pubDate></item><item><title><![CDATA[Reply to Funktiospointer on Fri, 16 May 2008 12:57:30 GMT]]></title><description><![CDATA[<p>Gibts wirklich noch keinen FAQ Eintrag zum Unterschied Memberfunktion- und Funktionszeiger? Die Frage hör ich in letzter Zeit wirklich extrem oft...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1510476</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1510476</guid><dc:creator><![CDATA[David_pb]]></dc:creator><pubDate>Fri, 16 May 2008 12:57:30 GMT</pubDate></item><item><title><![CDATA[Reply to Funktiospointer on Fri, 16 May 2008 13:08:03 GMT]]></title><description><![CDATA[<p>sothis_ schrieb:</p>
<blockquote>
<p>fF static machen</p>
</blockquote>
<p>ok, das hat funktioniert, damit bekomme ich aber das problem, das ich nicht mehr auf (public) elementvariablen die im konstruktor initialsiert wurden, in der funktion zugreifen kann!?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1510486</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1510486</guid><dc:creator><![CDATA[mkph]]></dc:creator><pubDate>Fri, 16 May 2008 13:08:03 GMT</pubDate></item><item><title><![CDATA[Reply to Funktiospointer on Fri, 16 May 2008 13:12:46 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">static double fF(currentdens* object, double t, void* p);
</code></pre>
<p><a href="http://www.parashift.com/c++-faq-lite/pointers-to-members.html" rel="nofollow">http://www.parashift.com/c++-faq-lite/pointers-to-members.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1510492</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1510492</guid><dc:creator><![CDATA[yawning]]></dc:creator><pubDate>Fri, 16 May 2008 13:12:46 GMT</pubDate></item><item><title><![CDATA[Reply to Funktiospointer on Fri, 16 May 2008 13:12:49 GMT]]></title><description><![CDATA[<p>mkph schrieb:</p>
<blockquote>
<p>sothis_ schrieb:</p>
<blockquote>
<p>fF static machen</p>
</blockquote>
<p>ok, das hat funktioniert, damit bekomme ich aber das problem, das ich nicht mehr auf (public) elementvariablen die im konstruktor initialsiert wurden, in der funktion zugreifen kann!?</p>
</blockquote>
<p>korrekt <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>
<p>da musst du der statischen funktion einen zeiger auf das objekt übergeben um darüber auf member zugreifen zu können</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1510493</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1510493</guid><dc:creator><![CDATA[sothis_]]></dc:creator><pubDate>Fri, 16 May 2008 13:12:49 GMT</pubDate></item><item><title><![CDATA[Reply to Funktiospointer on Fri, 16 May 2008 13:17:19 GMT]]></title><description><![CDATA[<p>Such mal nach Elementzeiger das hatten wir hier wirklich bereits zur genüge und ist im Netz auch genug vertreten.</p>
<p>Ok, da &quot;memberfunktionszeiger&quot; bei google zuerst einfach mal ein Troll Thread von hier rausspuckt hier eine ausführliche Erklärung (Englisch)</p>
<p><a href="http://www.newty.de/fpt/index.html" rel="nofollow">http://www.newty.de/fpt/index.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1510498</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1510498</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Fri, 16 May 2008 13:17:19 GMT</pubDate></item><item><title><![CDATA[Reply to Funktiospointer on Fri, 16 May 2008 13:48:16 GMT]]></title><description><![CDATA[<p>Danke, habe das Problem damit gelöst:)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1510511</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1510511</guid><dc:creator><![CDATA[mkph]]></dc:creator><pubDate>Fri, 16 May 2008 13:48:16 GMT</pubDate></item></channel></rss>