<?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[Unklar warum Templateklasse undefiniert]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe ein größeres Projekt, das unter anderem die Dateien &quot;sim_nc.h&quot;</p>
<pre><code class="language-cpp">#ifndef SIM_NODE_CONTNR_H_
#define SIM_NODE_CONTNR_H_

#include &quot;standard.h&quot;

#include &quot;base_nc.h&quot;

using namespace std;

class Sim_Nd;
class Sim_NC;
class Sim_Intern_NC;
class Sim_Tree;

class Sim_NC : public virtual Base_NC&lt;Sim_Nd, Sim_NC, Sim_Intern_NC, Sim_Tree&gt;
{
	...
};

...
</code></pre>
<p>und &quot;base_nc.h&quot;</p>
<pre><code class="language-cpp">#ifndef BASE_NODE_CONTR_H
#define BASE_NODE_CONTR_H

#include &quot;standard.h&quot;

#include &quot;changes.h&quot;
#include &quot;dot.h&quot;
#include &quot;error.h&quot;
#include &quot;in_out.h&quot;
#include &quot;trans_probs.h&quot;
#include &quot;tree.h&quot;

using namespace std;

struct struct_dot_para;
class Tree;
class Changes;
class S_and_P;

template&lt;class N, class C, class PC, class T&gt; class Base_NC
{
	...
};

...
</code></pre>
<p>enthält.</p>
<p>Wenn ich versuche zu kompilieren, erhalte ich die Fehlermeldung</p>
<blockquote>
<p>../src/node/sim_nc.h:17: error: expected template-name before ‘&lt;’ token<br />
../src/node/sim_nc.h:17: error: expected `{' before ‘&lt;’ token<br />
../src/node/sim_nc.h:17: error: expected unqualified-id before ‘&lt;’ token</p>
</blockquote>
<p>bzgl. der Zeile</p>
<pre><code class="language-cpp">class Sim_NC : public virtual Base_NC&lt;Sim_Nd, Sim_NC, Sim_Intern_NC, Sim_Tree&gt;
</code></pre>
<p>Wenn ich in &quot;sim_nc.h&quot; noch</p>
<pre><code class="language-cpp">template&lt;class N, class C, class PC, class T&gt; class Base_NC;
</code></pre>
<p>hinzufüge, ändert sich die Fehlermeldung zu</p>
<blockquote>
<p>../src/node/sim_nc.h:17: error: invalid use of undefined type ‘struct Base_NC&lt;Sim_Nd, Sim_NC, Sim_Intern_NC, Sim_Tree&gt;’</p>
</blockquote>
<p>Kann jemand eine Vermutung anstelle, was hier passiert?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/225177/unklar-warum-templateklasse-undefiniert</link><generator>RSS for Node</generator><lastBuildDate>Thu, 01 Oct 2026 14:28:26 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/225177.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 20 Oct 2008 14:54:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Unklar warum Templateklasse undefiniert on Mon, 20 Oct 2008 16:23:18 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich habe ein größeres Projekt, das unter anderem die Dateien &quot;sim_nc.h&quot;</p>
<pre><code class="language-cpp">#ifndef SIM_NODE_CONTNR_H_
#define SIM_NODE_CONTNR_H_

#include &quot;standard.h&quot;

#include &quot;base_nc.h&quot;

using namespace std;

class Sim_Nd;
class Sim_NC;
class Sim_Intern_NC;
class Sim_Tree;

class Sim_NC : public virtual Base_NC&lt;Sim_Nd, Sim_NC, Sim_Intern_NC, Sim_Tree&gt;
{
	...
};

...
</code></pre>
<p>und &quot;base_nc.h&quot;</p>
<pre><code class="language-cpp">#ifndef BASE_NODE_CONTR_H
#define BASE_NODE_CONTR_H

#include &quot;standard.h&quot;

#include &quot;changes.h&quot;
#include &quot;dot.h&quot;
#include &quot;error.h&quot;
#include &quot;in_out.h&quot;
#include &quot;trans_probs.h&quot;
#include &quot;tree.h&quot;

using namespace std;

struct struct_dot_para;
class Tree;
class Changes;
class S_and_P;

template&lt;class N, class C, class PC, class T&gt; class Base_NC
{
	...
};

...
</code></pre>
<p>enthält.</p>
<p>Wenn ich versuche zu kompilieren, erhalte ich die Fehlermeldung</p>
<blockquote>
<p>../src/node/sim_nc.h:17: error: expected template-name before ‘&lt;’ token<br />
../src/node/sim_nc.h:17: error: expected `{' before ‘&lt;’ token<br />
../src/node/sim_nc.h:17: error: expected unqualified-id before ‘&lt;’ token</p>
</blockquote>
<p>bzgl. der Zeile</p>
<pre><code class="language-cpp">class Sim_NC : public virtual Base_NC&lt;Sim_Nd, Sim_NC, Sim_Intern_NC, Sim_Tree&gt;
</code></pre>
<p>Wenn ich in &quot;sim_nc.h&quot; noch</p>
<pre><code class="language-cpp">template&lt;class N, class C, class PC, class T&gt; class Base_NC;
</code></pre>
<p>hinzufüge, ändert sich die Fehlermeldung zu</p>
<blockquote>
<p>../src/node/sim_nc.h:17: error: invalid use of undefined type ‘struct Base_NC&lt;Sim_Nd, Sim_NC, Sim_Intern_NC, Sim_Tree&gt;’</p>
</blockquote>
<p>Kann jemand eine Vermutung anstelle, was hier passiert?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1601758</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1601758</guid><dc:creator><![CDATA[ingobulla]]></dc:creator><pubDate>Mon, 20 Oct 2008 16:23:18 GMT</pubDate></item><item><title><![CDATA[Reply to Unklar warum Templateklasse undefiniert on Mon, 20 Oct 2008 15:23:18 GMT]]></title><description><![CDATA[<p>Hi, in der &quot;base_nc.h&quot; fehlt ein Semikolon zum Klassenabschluß oder hast Du es nur nicht mitkopiert?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1601778</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1601778</guid><dc:creator><![CDATA[witte]]></dc:creator><pubDate>Mon, 20 Oct 2008 15:23:18 GMT</pubDate></item><item><title><![CDATA[Reply to Unklar warum Templateklasse undefiniert on Mon, 20 Oct 2008 16:25:03 GMT]]></title><description><![CDATA[<p>witte schrieb:</p>
<blockquote>
<p>Hi, in der &quot;base_nc.h&quot; fehlt ein Semikolon zum Klassenabschluß oder hast Du es nur nicht mitkopiert?</p>
</blockquote>
<p>Sorry, nur vergessen mitzukopieren, habe ich im Code korrigiert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1601806</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1601806</guid><dc:creator><![CDATA[ingobulla]]></dc:creator><pubDate>Mon, 20 Oct 2008 16:25:03 GMT</pubDate></item><item><title><![CDATA[Reply to Unklar warum Templateklasse undefiniert on Mon, 20 Oct 2008 21:06:28 GMT]]></title><description><![CDATA[<p>Sind evtl. zirkuläre Abhängigkeiten beim Inkludieren entstanden?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1601945</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1601945</guid><dc:creator><![CDATA[camper]]></dc:creator><pubDate>Mon, 20 Oct 2008 21:06:28 GMT</pubDate></item><item><title><![CDATA[Reply to Unklar warum Templateklasse undefiniert on Mon, 20 Oct 2008 21:39:32 GMT]]></title><description><![CDATA[<p>camper schrieb:</p>
<blockquote>
<p>Sind evtl. zirkuläre Abhängigkeiten beim Inkludieren entstanden?</p>
</blockquote>
<p>Gibt es eine Möglichkeit das rauszufinden außer per Hand den Code durchzugehen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1601950</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1601950</guid><dc:creator><![CDATA[ingobulla]]></dc:creator><pubDate>Mon, 20 Oct 2008 21:39:32 GMT</pubDate></item><item><title><![CDATA[Reply to Unklar warum Templateklasse undefiniert on Mon, 20 Oct 2008 22:18:24 GMT]]></title><description><![CDATA[<p>ingobulla schrieb:</p>
<blockquote>
<p>Gibt es eine Möglichkeit das rauszufinden außer per Hand den Code durchzugehen?</p>
</blockquote>
<p>Include-Guards.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1601960</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1601960</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Mon, 20 Oct 2008 22:18:24 GMT</pubDate></item><item><title><![CDATA[Reply to Unklar warum Templateklasse undefiniert on Tue, 21 Oct 2008 05:59:38 GMT]]></title><description><![CDATA[<p>Nexus schrieb:</p>
<blockquote>
<p>ingobulla schrieb:</p>
<blockquote>
<p>Gibt es eine Möglichkeit das rauszufinden außer per Hand den Code durchzugehen?</p>
</blockquote>
<p>Include-Guards.</p>
</blockquote>
<p>Wie sollen Include-Guards dabei helfen, zyklische Includedirektiven zu finden?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1601995</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1601995</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Tue, 21 Oct 2008 05:59:38 GMT</pubDate></item><item><title><![CDATA[Reply to Unklar warum Templateklasse undefiniert on Tue, 21 Oct 2008 07:38:57 GMT]]></title><description><![CDATA[<p>ingobulla schrieb:</p>
<blockquote>
<p>camper schrieb:</p>
<blockquote>
<p>Sind evtl. zirkuläre Abhängigkeiten beim Inkludieren entstanden?</p>
</blockquote>
<p>Gibt es eine Möglichkeit das rauszufinden außer per Hand den Code durchzugehen?</p>
</blockquote>
<p>Gibt es keine Programme, die einem graphisch (oder auf andere Weise übersichtlich) aufbereiten, welche Dateien von jeder Datei inkludiert werden?</p>
<p>Oder kann man sich irgendwie anschauen, was der Präprozessor aus dem Code macht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1602018</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1602018</guid><dc:creator><![CDATA[ingobulla]]></dc:creator><pubDate>Tue, 21 Oct 2008 07:38:57 GMT</pubDate></item><item><title><![CDATA[Reply to Unklar warum Templateklasse undefiniert on Tue, 21 Oct 2008 07:51:08 GMT]]></title><description><![CDATA[<p>doxygen kann, im Zusammenhang mit graphviz, die include-Abhängigkeiten grafisch darstellen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1602024</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1602024</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Tue, 21 Oct 2008 07:51:08 GMT</pubDate></item><item><title><![CDATA[Reply to Unklar warum Templateklasse undefiniert on Tue, 21 Oct 2008 14:01:39 GMT]]></title><description><![CDATA[<p>Mit entsprechenden Optionen (z.B. gcc: -E visual c++: /E) kannst du den Compiler anweisen, den Output des Präprozessors auszugeben. Falls eine zirkuläre Abhängigkeit Ursache des Problems darstellt, würde sich das dadurch äußern, dass die Definition Base_NC erst nach der Definition von Sim_NC erfolgt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1602266</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1602266</guid><dc:creator><![CDATA[camper]]></dc:creator><pubDate>Tue, 21 Oct 2008 14:01:39 GMT</pubDate></item><item><title><![CDATA[Reply to Unklar warum Templateklasse undefiniert on Tue, 21 Oct 2008 15:20:18 GMT]]></title><description><![CDATA[<p>MFK schrieb:</p>
<blockquote>
<p>Wie sollen Include-Guards dabei helfen, zyklische Includedirektiven zu finden?</p>
</blockquote>
<p>Man kann damit verhindern, dass Header mehrfach eingebunden und eventuell auch eine Warnung/einen Fehler ausgeben.</p>
<p>Oh, irgendwie hab ich das Gefühl, ich hab unter zirkulären Abhängigkeiten etwas anderes verstanden. Falls dem so ist, sorry für meinen Beitrag. <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1602326</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1602326</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Tue, 21 Oct 2008 15:20:18 GMT</pubDate></item></channel></rss>