<?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[include fehler]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich bins schon wieder ;). Ich habe hier glaube ich einen include Fehler, sehe aber die Lösung nicht.</p>
<p>Datei ast.h</p>
<pre><code class="language-cpp">#ifndef _AST_H
#define	_AST_H

typedef struct {

    int aggnum;
    int varid;

} AggFunction;

#include &quot;astselect.h&quot;
#include &lt;stdint.h&gt;

namespace AST {

class AST {

public:

    AST();

    ~AST();

    virtual void createASTfromBitStream(uint8_t* data);

    ASTSelect getSelectClause();
private:
}; //End class
} //End namespace
#endif	/* _AST_H */
</code></pre>
<p>Datei astselect.h</p>
<pre><code class="language-cpp">#ifndef _ASTSELECT_H
#define	_ASTSELECT_H

#include &lt;stdlib.h&gt;
#include &quot;ast.h&quot;

namespace AST{

class ASTSelect {

public:

    ASTSelect(int numVar, int numAgg);

    ~ASTSelect();

    virtual void addSelectVar(int var);

    virtual void addSelectAgg(int aggNum, int var);

    virtual void addSelectAgg(AggFunction agg);

    virtual void addSelectId();

    virtual void addSelectTs();

    virtual void addSelectGeo();

    virtual int getSelectVarCnt();

    virtual int getSelectAggCnt();

    virtual int getSelectVar(int i);

    virtual AggFunction getSelectAgg(int i);

    virtual bool selectId();

    virtual bool selectTs();

    virtual bool selectGeo();

private:

    int* varList;
    AggFunction* aggList;

    int varIndex;
    int aggIndex;

    bool selectIdFlag;
    bool selectTsFlag;
    bool selectGeoFlag;

};//End class ASTSelect

}//End namespace AST

#endif	/* _ASTSELECT_H */
</code></pre>
<p>Der Fehler bezieht sich auf die erste Datei:</p>
<pre><code>In file included from source/ast/astselect.h:13,
                 from source/ast/astselect.cpp:9:
source/ast/ast.h:38: Fehler: »ASTSelect« bezeichnet keinen Typ
</code></pre>
<p>Was ist falsch???</p>
<p>uwe</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/237691/include-fehler</link><generator>RSS for Node</generator><lastBuildDate>Wed, 23 Sep 2026 09:20:25 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/237691.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 31 Mar 2009 19:16:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to include fehler on Tue, 31 Mar 2009 19:16:10 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich bins schon wieder ;). Ich habe hier glaube ich einen include Fehler, sehe aber die Lösung nicht.</p>
<p>Datei ast.h</p>
<pre><code class="language-cpp">#ifndef _AST_H
#define	_AST_H

typedef struct {

    int aggnum;
    int varid;

} AggFunction;

#include &quot;astselect.h&quot;
#include &lt;stdint.h&gt;

namespace AST {

class AST {

public:

    AST();

    ~AST();

    virtual void createASTfromBitStream(uint8_t* data);

    ASTSelect getSelectClause();
private:
}; //End class
} //End namespace
#endif	/* _AST_H */
</code></pre>
<p>Datei astselect.h</p>
<pre><code class="language-cpp">#ifndef _ASTSELECT_H
#define	_ASTSELECT_H

#include &lt;stdlib.h&gt;
#include &quot;ast.h&quot;

namespace AST{

class ASTSelect {

public:

    ASTSelect(int numVar, int numAgg);

    ~ASTSelect();

    virtual void addSelectVar(int var);

    virtual void addSelectAgg(int aggNum, int var);

    virtual void addSelectAgg(AggFunction agg);

    virtual void addSelectId();

    virtual void addSelectTs();

    virtual void addSelectGeo();

    virtual int getSelectVarCnt();

    virtual int getSelectAggCnt();

    virtual int getSelectVar(int i);

    virtual AggFunction getSelectAgg(int i);

    virtual bool selectId();

    virtual bool selectTs();

    virtual bool selectGeo();

private:

    int* varList;
    AggFunction* aggList;

    int varIndex;
    int aggIndex;

    bool selectIdFlag;
    bool selectTsFlag;
    bool selectGeoFlag;

};//End class ASTSelect

}//End namespace AST

#endif	/* _ASTSELECT_H */
</code></pre>
<p>Der Fehler bezieht sich auf die erste Datei:</p>
<pre><code>In file included from source/ast/astselect.h:13,
                 from source/ast/astselect.cpp:9:
source/ast/ast.h:38: Fehler: »ASTSelect« bezeichnet keinen Typ
</code></pre>
<p>Was ist falsch???</p>
<p>uwe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1689008</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1689008</guid><dc:creator><![CDATA[uwerothfeld]]></dc:creator><pubDate>Tue, 31 Mar 2009 19:16:10 GMT</pubDate></item><item><title><![CDATA[Reply to include fehler on Tue, 31 Mar 2009 20:04:55 GMT]]></title><description><![CDATA[<p>Ich glaube, das gegenseitige Including der Header macht hier Ärger. Versuche Vorwärtsdeklarationen zu benutzen und/oder die Abhängigkeiten zu vermindern. Eventuell braucht astselect.h ast.h nicht direkt? Zeit für ein wenig Refaktorisierung... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1689027</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1689027</guid><dc:creator><![CDATA[*rant*]]></dc:creator><pubDate>Tue, 31 Mar 2009 20:04:55 GMT</pubDate></item><item><title><![CDATA[Reply to include fehler on Wed, 01 Apr 2009 07:14:50 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich habe das Design geändert <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /> Eine Frage habe ich noch. Ich habe einen Namespace AST und eine Klasse AST(ist sozusagen die Hauptklasse innerhalb des Namespaces). Nun mault er bei der Definition des Konstruktors AST::AST(), dass dieser nicht eindeutig ist:</p>
<pre><code>source/ast/ast.cpp:12: Fehler: Referenz auf »AST« ist mehrdeutig
source/ast/astselect.h:14: Fehler: candidates are: namespace AST { }
source/ast/ast.h:22: Fehler:                 class AST::AST
</code></pre>
<p>Kann man dies beheben, oder muß ich die Klasse umbennen?</p>
<p>uwe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1689117</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1689117</guid><dc:creator><![CDATA[uwerothfeld]]></dc:creator><pubDate>Wed, 01 Apr 2009 07:14:50 GMT</pubDate></item><item><title><![CDATA[Reply to include fehler on Wed, 01 Apr 2009 07:26:55 GMT]]></title><description><![CDATA[<p>Geht es mit</p>
<pre><code class="language-cpp">AST::AST::AST()
{}
</code></pre>
<p>?<br />
Ansonsten würde ich sowas echt vermeiden. Schreib doch einfach Ast..<br />
rya.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1689123</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1689123</guid><dc:creator><![CDATA[[[global:former_user]]]]></dc:creator><pubDate>Wed, 01 Apr 2009 07:26:55 GMT</pubDate></item><item><title><![CDATA[Reply to include fehler on Wed, 01 Apr 2009 08:13:23 GMT]]></title><description><![CDATA[<p>hi,</p>
<p>ich nenne den namespace anders, ist wohl das einfachste.</p>
<p>danke. uwe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1689142</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1689142</guid><dc:creator><![CDATA[uwerothfeld]]></dc:creator><pubDate>Wed, 01 Apr 2009 08:13:23 GMT</pubDate></item></channel></rss>