<?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[Unverständlicher Fehler]]></title><description><![CDATA[<p>Header Datei</p>
<pre><code>#ifndef _VAR_H_INCLUDE_
#define _VAR_H_INCLUDE_

#include &lt;iostream&gt;
using namespace std;

template &lt;typename T=int&gt;
class testklasse {
public :
	T wert;
	void func() const;
};

#endif //_VAR_H_INCLUDE_
</code></pre>
<p>Implementierung</p>
<pre><code>#include &quot;var.h&quot;

template &lt;typename T = int&gt;
void testklasse&lt;T&gt;::func() const{
	cout &lt;&lt; &quot;Hallo Welt&quot;;
}
</code></pre>
<p>Main-Datei</p>
<pre><code>#include &lt;iostream&gt;
#include &quot;var.h&quot;

int main() {

	testklasse&lt;&gt; a;
	//a.func();

	getchar();
}
</code></pre>
<p>Also das klappt ja soweit aber wenn ich <a href="//a.func">//a.func</a>() auskommentiere gibt mir der Compiler den Fehler main.obj : error LNK2019: Verweis auf nicht aufgel÷stes externes Symbol &quot;&quot;public: void __thiscall testklasse&lt;int&gt;::func(void)const &quot; (?func@?$testklasse@H@@QBEXXZ)&quot; in Funktion &quot;_main&quot;. Woran kann das liegen ?<br />
Danke für eure Hilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/325972/unverständlicher-fehler</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Jul 2026 13:50:01 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/325972.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 26 May 2014 09:33:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Unverständlicher Fehler on Mon, 26 May 2014 09:33:59 GMT]]></title><description><![CDATA[<p>Header Datei</p>
<pre><code>#ifndef _VAR_H_INCLUDE_
#define _VAR_H_INCLUDE_

#include &lt;iostream&gt;
using namespace std;

template &lt;typename T=int&gt;
class testklasse {
public :
	T wert;
	void func() const;
};

#endif //_VAR_H_INCLUDE_
</code></pre>
<p>Implementierung</p>
<pre><code>#include &quot;var.h&quot;

template &lt;typename T = int&gt;
void testklasse&lt;T&gt;::func() const{
	cout &lt;&lt; &quot;Hallo Welt&quot;;
}
</code></pre>
<p>Main-Datei</p>
<pre><code>#include &lt;iostream&gt;
#include &quot;var.h&quot;

int main() {

	testklasse&lt;&gt; a;
	//a.func();

	getchar();
}
</code></pre>
<p>Also das klappt ja soweit aber wenn ich <a href="//a.func">//a.func</a>() auskommentiere gibt mir der Compiler den Fehler main.obj : error LNK2019: Verweis auf nicht aufgel÷stes externes Symbol &quot;&quot;public: void __thiscall testklasse&lt;int&gt;::func(void)const &quot; (?func@?$testklasse@H@@QBEXXZ)&quot; in Funktion &quot;_main&quot;. Woran kann das liegen ?<br />
Danke für eure Hilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2400877</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2400877</guid><dc:creator><![CDATA[Michael30121]]></dc:creator><pubDate>Mon, 26 May 2014 09:33:59 GMT</pubDate></item><item><title><![CDATA[Reply to Unverständlicher Fehler on Mon, 26 May 2014 09:42:04 GMT]]></title><description><![CDATA[<p><a href="http://www.c-plusplus.net/forum/151578" rel="nofollow">FAQ</a> Punkt 5</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2400881</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2400881</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Mon, 26 May 2014 09:42:04 GMT</pubDate></item><item><title><![CDATA[Reply to Unverständlicher Fehler on Mon, 26 May 2014 09:47:38 GMT]]></title><description><![CDATA[<p>Außerdem: Das hier</p>
<p>Michael30121 schrieb:</p>
<blockquote>
<pre><code>_VAR_H_INCLUDE_
</code></pre>
</blockquote>
<p>gehört zu den reservierten Namen, die Du nicht benutzen darfst. Vermeide einfach alles, was zwei aufeinanderfolgende Unterstriche hat oder mit einen Unterstrich anfängt und mit einem Großbuchstaben weitergeht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2400882</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2400882</guid><dc:creator><![CDATA[kkaw]]></dc:creator><pubDate>Mon, 26 May 2014 09:47:38 GMT</pubDate></item><item><title><![CDATA[Reply to Unverständlicher Fehler on Mon, 26 May 2014 12:21:55 GMT]]></title><description><![CDATA[<p>Manno, Unterstriche sind aber kuhler.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2400915</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2400915</guid><dc:creator><![CDATA[ScottZhang]]></dc:creator><pubDate>Mon, 26 May 2014 12:21:55 GMT</pubDate></item></channel></rss>