<?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[Template Problem - ... is not a template type]]></title><description><![CDATA[<p>Hi,<br />
Ich probier gerade eine Klasse mit einem Template zu erweitern, doch ich komme einfach nicht an diesem Fehler vorbei.</p>
<p>.h</p>
<pre><code class="language-cpp">template &lt;class Typ&gt;
class GUISlider : public GUIBase
{	
    private:
        Typ* var;
        double length;
        bool vertical;

    public:
        GUISlider (GUIForm* FORM);
        ~GUISlider ();
        void setVar (Typ* VAR);
        void draw (void);
};
</code></pre>
<p>.cpp</p>
<pre><code class="language-cpp">template &lt;class Typ&gt;
ge::GUISlider&lt;Typ&gt;::GUISlider (GUIForm* FORM)
{
    parentForm = FORM;
    var = 0;
    length = 0;
    vertical = true;
}

template &lt;class Typ&gt;
ge::GUISlider&lt;Typ&gt;::~GUISlider ()
{
}

template &lt;class Typ&gt;
void ge::GUISlider&lt;Typ&gt;::setVar (Typ* VAR)
{
    var = VAR;
}

template &lt;class Typ&gt;
void ge::GUISlider&lt;Typ&gt;::draw (void)
{
}
</code></pre>
<p>Der einzige Fehler den ich bekomme lautet:<br />
[Error] 'ge::GUISlider' is not a template type<br />
Im Header, Zeile 2 (class GUISlider : public GUIBase)</p>
<p>Aber wo liegt das Problem?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/305915/template-problem-is-not-a-template-type</link><generator>RSS for Node</generator><lastBuildDate>Sat, 08 Aug 2026 12:25:05 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/305915.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 12 Jul 2012 09:44:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Template Problem - ... is not a template type on Thu, 12 Jul 2012 09:44:03 GMT]]></title><description><![CDATA[<p>Hi,<br />
Ich probier gerade eine Klasse mit einem Template zu erweitern, doch ich komme einfach nicht an diesem Fehler vorbei.</p>
<p>.h</p>
<pre><code class="language-cpp">template &lt;class Typ&gt;
class GUISlider : public GUIBase
{	
    private:
        Typ* var;
        double length;
        bool vertical;

    public:
        GUISlider (GUIForm* FORM);
        ~GUISlider ();
        void setVar (Typ* VAR);
        void draw (void);
};
</code></pre>
<p>.cpp</p>
<pre><code class="language-cpp">template &lt;class Typ&gt;
ge::GUISlider&lt;Typ&gt;::GUISlider (GUIForm* FORM)
{
    parentForm = FORM;
    var = 0;
    length = 0;
    vertical = true;
}

template &lt;class Typ&gt;
ge::GUISlider&lt;Typ&gt;::~GUISlider ()
{
}

template &lt;class Typ&gt;
void ge::GUISlider&lt;Typ&gt;::setVar (Typ* VAR)
{
    var = VAR;
}

template &lt;class Typ&gt;
void ge::GUISlider&lt;Typ&gt;::draw (void)
{
}
</code></pre>
<p>Der einzige Fehler den ich bekomme lautet:<br />
[Error] 'ge::GUISlider' is not a template type<br />
Im Header, Zeile 2 (class GUISlider : public GUIBase)</p>
<p>Aber wo liegt das Problem?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2232166</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2232166</guid><dc:creator><![CDATA[DrFail]]></dc:creator><pubDate>Thu, 12 Jul 2012 09:44:03 GMT</pubDate></item><item><title><![CDATA[Reply to Template Problem - ... is not a template type on Thu, 12 Jul 2012 09:47:53 GMT]]></title><description><![CDATA[<p>Schau mal in die FAQ-Liste</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2232171</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2232171</guid><dc:creator><![CDATA[krümelkacker]]></dc:creator><pubDate>Thu, 12 Jul 2012 09:47:53 GMT</pubDate></item><item><title><![CDATA[Reply to Template Problem - ... is not a template type on Thu, 12 Jul 2012 09:49:46 GMT]]></title><description><![CDATA[<p><a href="http://www.c-plusplus.net/forum/151578" rel="nofollow">Unter Punkt 5.</a><br />
Siehe auch <a href="http://www.c-plusplus.net/forum/p1993089#1993089" rel="nofollow">hier</a> den Beitrag von wxSkip ab Punkt 4.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2232172</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2232172</guid><dc:creator><![CDATA[icarus2]]></dc:creator><pubDate>Thu, 12 Jul 2012 09:49:46 GMT</pubDate></item><item><title><![CDATA[Reply to Template Problem - ... is not a template type on Thu, 12 Jul 2012 09:51:10 GMT]]></title><description><![CDATA[<p>Du musst die Definitionen in den Header machen.</p>
<p>MfG</p>
<p>Edit: Zu langsam, sorry.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2232173</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2232173</guid><dc:creator><![CDATA[yihaaa]]></dc:creator><pubDate>Thu, 12 Jul 2012 09:51:10 GMT</pubDate></item><item><title><![CDATA[Reply to Template Problem - ... is not a template type on Thu, 12 Jul 2012 09:55:17 GMT]]></title><description><![CDATA[<p>DrFail schrieb:</p>
<blockquote>
<p>Aber wo liegt das Problem?</p>
</blockquote>
<p>Hast du eine Include-Direktive für den Header?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2232175</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2232175</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Thu, 12 Jul 2012 09:55:17 GMT</pubDate></item><item><title><![CDATA[Reply to Template Problem - ... is not a template type on Thu, 12 Jul 2012 10:07:44 GMT]]></title><description><![CDATA[<p>Also wenn ich jetzt alle Funktionen in die Klassen-Deklaration packe, muss ich dann für jeden Datentyp eine spezielle Definition in die .cpp Datei schreiben?</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/2803">@MFK</a>: Ja, die ist drin, daran liegts leider nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2232179</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2232179</guid><dc:creator><![CDATA[DrFail]]></dc:creator><pubDate>Thu, 12 Jul 2012 10:07:44 GMT</pubDate></item><item><title><![CDATA[Reply to Template Problem - ... is not a template type on Thu, 12 Jul 2012 10:10:06 GMT]]></title><description><![CDATA[<p>Ich kann den Fehler nicht reproduzieren:<br />
<a href="http://ideone.com/WiKgD" rel="nofollow">http://ideone.com/WiKgD</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2232180</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2232180</guid><dc:creator><![CDATA[krümelkacker]]></dc:creator><pubDate>Thu, 12 Jul 2012 10:10:06 GMT</pubDate></item><item><title><![CDATA[Reply to Template Problem - ... is not a template type on Thu, 12 Jul 2012 10:12:21 GMT]]></title><description><![CDATA[<p>DrFail schrieb:</p>
<blockquote>
<p>Also wenn ich jetzt alle Funktionen in die Klassen-Deklaration packe</p>
</blockquote>
<p>Wenn das das einzige Problem wäre, würdest du Linkerfehler sehen. Die Compilerfehlermeldung hat eine andere Ursache.</p>
<p>Hast du vielleicht irgendwo eine Forward Declaration von GUISlider, ohne template?</p>
<p>Zeig doch mal ein kompilierbares Minimalbeispiel, das den Fehler reproduziert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2232181</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2232181</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Thu, 12 Jul 2012 10:12:21 GMT</pubDate></item><item><title><![CDATA[Reply to Template Problem - ... is not a template type on Thu, 12 Jul 2012 10:15:07 GMT]]></title><description><![CDATA[<p>DrFail schrieb:</p>
<blockquote>
<p>Also wenn ich jetzt alle Funktionen in die Klassen-Deklaration packe,</p>
</blockquote>
<p>Du meinst eine Klassen<strong>definition</strong>.</p>
<p>DrFail schrieb:</p>
<blockquote>
<p>muss ich dann für jeden Datentyp eine spezielle Definition in die .cpp Datei schreiben?</p>
</blockquote>
<p>Schau in deinem C++-Buch nach der &quot;one definition rule&quot;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2232182</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2232182</guid><dc:creator><![CDATA[krümelkacker]]></dc:creator><pubDate>Thu, 12 Jul 2012 10:15:07 GMT</pubDate></item><item><title><![CDATA[Reply to Template Problem - ... is not a template type on Thu, 12 Jul 2012 10:17:10 GMT]]></title><description><![CDATA[<p>Ohne Glaskugel rate ich mal, dass es eine vorherige Deklaration von GUISlider gibt, die kein Template deklariert (sondern vermutlich eine normale Klasse).<br />
Ohne den gesamten Code zu kennen, kann es jedenfalls keine definitive Antwort geben.<br />
<a href="http://www.c-plusplus.net/forum/304133" rel="nofollow">http://www.c-plusplus.net/forum/304133</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2232184</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2232184</guid><dc:creator><![CDATA[camper]]></dc:creator><pubDate>Thu, 12 Jul 2012 10:17:10 GMT</pubDate></item><item><title><![CDATA[Reply to Template Problem - ... is not a template type on Thu, 12 Jul 2012 12:48:07 GMT]]></title><description><![CDATA[<p>Alles klar, hab den Fehler gefunden. Ich einer anderen Klasse stand noch &quot;friend class GUISlider&quot;.<br />
Das braucht es aber gar nicht mehr, habs wohl vergessen rauszunehmen.<br />
Sorry für die unnötige Störung und trotzdem danke, dass ihr mich auf die richtige Spur gebracht habt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2232224</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2232224</guid><dc:creator><![CDATA[DrFail]]></dc:creator><pubDate>Thu, 12 Jul 2012 12:48:07 GMT</pubDate></item></channel></rss>