<?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[functionpointer]]></title><description><![CDATA[<p>ok, ich habe innerhalb einer klasse eine funktion</p>
<pre><code class="language-cpp">int release();
</code></pre>
<p>und eine andere Klasse, die einen funktionspointer auf genau diese Klasse als parameter im ctor haben will:</p>
<pre><code class="language-cpp">template&lt;class TextureType&gt;
class TexturePointer{
    private:
        int (*privateRelease)();
        TextureType* Texture;
    public:
        TexturePointer(int (*ReleaseFunc)(),TextureType* Type):privateRelease(ReleaseFunc),Texture(Type){}
};
</code></pre>
<p>so, nun ruf ich den ctor auf:</p>
<pre><code class="language-cpp">return Texture::TexturePointer&lt;PDIRECT3DTEXTURE9&gt;(Textures.getAllocator(TextureName).Release,Textures.getAllocator(TextureName).getTexture());
//jaja,lang,ich weis^^
</code></pre>
<p>Erklärung: ich hab nen textur container, der dynamisch texturen erstellt, mit getallocator bekommt man zugriff auf einen member der Klasse TextureAllocator, der die textur und die methode Release enthält.<br />
nunja, ich bekomm den fehler:<br />
[C++ Error] DirectXtextures.cpp(72): E2285 Could not find a match for 'TexturePointer&lt;IDirect3DTexture9 <em>&gt;::TexturePointer(int (</em> (_closure )())(),IDirect3DTexture9 * *)'</p>
<p>was hab ich übersehen? ich weis, dass man bei methoden noch irgendwas beachten muss, aber auf <a href="http://function-pointers.org" rel="nofollow">function-pointers.org</a> hab ich nichts entdeckt...</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/75552/functionpointer</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 18:54:51 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/75552.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 01 Jun 2004 21:16:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to functionpointer on Tue, 01 Jun 2004 21:18:21 GMT]]></title><description><![CDATA[<p>ok, ich habe innerhalb einer klasse eine funktion</p>
<pre><code class="language-cpp">int release();
</code></pre>
<p>und eine andere Klasse, die einen funktionspointer auf genau diese Klasse als parameter im ctor haben will:</p>
<pre><code class="language-cpp">template&lt;class TextureType&gt;
class TexturePointer{
    private:
        int (*privateRelease)();
        TextureType* Texture;
    public:
        TexturePointer(int (*ReleaseFunc)(),TextureType* Type):privateRelease(ReleaseFunc),Texture(Type){}
};
</code></pre>
<p>so, nun ruf ich den ctor auf:</p>
<pre><code class="language-cpp">return Texture::TexturePointer&lt;PDIRECT3DTEXTURE9&gt;(Textures.getAllocator(TextureName).Release,Textures.getAllocator(TextureName).getTexture());
//jaja,lang,ich weis^^
</code></pre>
<p>Erklärung: ich hab nen textur container, der dynamisch texturen erstellt, mit getallocator bekommt man zugriff auf einen member der Klasse TextureAllocator, der die textur und die methode Release enthält.<br />
nunja, ich bekomm den fehler:<br />
[C++ Error] DirectXtextures.cpp(72): E2285 Could not find a match for 'TexturePointer&lt;IDirect3DTexture9 <em>&gt;::TexturePointer(int (</em> (_closure )())(),IDirect3DTexture9 * *)'</p>
<p>was hab ich übersehen? ich weis, dass man bei methoden noch irgendwas beachten muss, aber auf <a href="http://function-pointers.org" rel="nofollow">function-pointers.org</a> hab ich nichts entdeckt...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/531278</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/531278</guid><dc:creator><![CDATA[otze]]></dc:creator><pubDate>Tue, 01 Jun 2004 21:18:21 GMT</pubDate></item><item><title><![CDATA[Reply to functionpointer on Tue, 01 Jun 2004 21:19:55 GMT]]></title><description><![CDATA[<p>Funktionspointer != Methodenpointer</p>
<p>Schau mal in die FAQ, da steht wie man einen Methodenpointer korrekt<br />
anlegt und benutzt.</p>
<p>Devil</p>
]]></description><link>https://www.c-plusplus.net/forum/post/531279</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/531279</guid><dc:creator><![CDATA[phlox81]]></dc:creator><pubDate>Tue, 01 Jun 2004 21:19:55 GMT</pubDate></item></channel></rss>