<?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]]></title><description><![CDATA[<p>Hallo,<br />
ich soll einen eigenen generischen Container List&lt;E&gt; implementieren.<br />
Ich bekomme aber folgenen Fehler:</p>
<p>List.cpp:75:1: error: invalid use of template-name 'List' without an argument list<br />
List::Node List&lt;E&gt;::begin() {</p>
<p>List.cpp</p>
<pre><code>#include &quot;List.h&quot;

template&lt;class E&gt;
List&lt;E&gt;::List() {}

template&lt;class E&gt;
List&lt;E&gt;::~List() {}

template&lt;class E&gt;
List::Node List&lt;E&gt;::begin() { //Hier ist der Fehler
    return start;
}
</code></pre>
<p>List.h</p>
<pre><code>template &lt;class E&gt;
class List {
public:
    List();
    virtual ~List();
    struct Node {E value; Node *next; Node *before;};
    Node begin();
private:
    Node *const start = new Node; 
};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/333045/template-problem</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Apr 2026 06:50:50 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/333045.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 08 Jun 2015 13:46:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Template problem on Mon, 08 Jun 2015 13:46:10 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich soll einen eigenen generischen Container List&lt;E&gt; implementieren.<br />
Ich bekomme aber folgenen Fehler:</p>
<p>List.cpp:75:1: error: invalid use of template-name 'List' without an argument list<br />
List::Node List&lt;E&gt;::begin() {</p>
<p>List.cpp</p>
<pre><code>#include &quot;List.h&quot;

template&lt;class E&gt;
List&lt;E&gt;::List() {}

template&lt;class E&gt;
List&lt;E&gt;::~List() {}

template&lt;class E&gt;
List::Node List&lt;E&gt;::begin() { //Hier ist der Fehler
    return start;
}
</code></pre>
<p>List.h</p>
<pre><code>template &lt;class E&gt;
class List {
public:
    List();
    virtual ~List();
    struct Node {E value; Node *next; Node *before;};
    Node begin();
private:
    Node *const start = new Node; 
};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2456098</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2456098</guid><dc:creator><![CDATA[mirin]]></dc:creator><pubDate>Mon, 08 Jun 2015 13:46:10 GMT</pubDate></item><item><title><![CDATA[Reply to Template problem on Mon, 08 Jun 2015 14:04:18 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>list.cpp bei templates?<br />
Die Fehlermeldung kommt aber davon, dass es keine List (List::Node) gibt, sondern nur List&lt;E&gt;.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2456100</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2456100</guid><dc:creator><![CDATA[Jockelx]]></dc:creator><pubDate>Mon, 08 Jun 2015 14:04:18 GMT</pubDate></item><item><title><![CDATA[Reply to Template problem on Mon, 08 Jun 2015 15:57:46 GMT]]></title><description><![CDATA[<p>mirin schrieb:</p>
<blockquote>
<pre><code>template&lt;class E&gt;
List::Node List&lt;E&gt;::begin() { //Hier ist der Fehler
    return start;
}
</code></pre>
</blockquote>
<p>=&gt;</p>
<pre><code>template&lt;class E&gt;
List&lt;E&gt;::Node List&lt;E&gt;::begin() {
    return start;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2456106</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2456106</guid><dc:creator><![CDATA[tntnet]]></dc:creator><pubDate>Mon, 08 Jun 2015 15:57:46 GMT</pubDate></item></channel></rss>