<?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[error: ISO C++ forbids declaration of &#x27;xyz&#x27; with no type]]></title><description><![CDATA[<p>Hallo,<br />
Was will einem diese Fehlermeldung eigentlich sagen?</p>
<p>U.a. habe ich folgende abstrakte Klasse geschrieben. In ihr soll ein Zeiger &quot;pParent&quot; enthalten sein. Leider erkennt der Compiler (gcc) &quot;EditorGUI*&quot; nicht als Typ fuer diesen an (in dieser Klasse), egal wie ich es deklariere.</p>
<p>Der gcc meint immer nur:<br />
ISO C++ forbids declaration of 'EditorGUI' with no type... - Aber EditorGUI ist doch der &quot;Type&quot;, Mensch!!! Ich drehe langsam wirklich am Rad, die Information ist so nichtssagend..</p>
<p>Meine erste Vermutung, war eine vergessene Klammer/Semicolon in den EditorGUI Dateien (.cpp/.hpp), hab aber bisher nix gefunden. Vllt hat irgendwer noch irgendwelche Tipps, wo und v.a. nach was ich da eigentlich noch suchen kann?</p>
<pre><code>#ifndef PNOPTION
#define PNOPTION

#include &lt;QtGui&gt;

#include &lt;iostream&gt;

#include &quot;Element.hpp&quot;
#include &quot;EditorGUI.hpp&quot;

class PnOption : public QTabWidget
{
private:
    EditorGUI* pParent; // wird nicht erkannt!!!

public:
    PnOption(){};
    virtual ~PnOption(){};
    virtual void acceptModification()=0;
    virtual void updateContent()=0;

protected:
    void setParent(EditorGUI* p){ pParent = p; };
    QLabel* lbTranslated;
    QLabel* lbUntranslated;
    Element* getElementCopy(){ return pParent-&gt;getElementCopy(); };
    void actualizeElement(){ pParent-&gt;actualizeElement(); };
    virtual void initGUI()=0;
};
#endif
</code></pre>
<pre><code>rm -f moc_EditorGUI.cpp moc_MainGUI.cpp moc_PnCenterResult.cpp moc_PnCenterStart.cpp moc_PnCenterTest.cpp moc_PnOptionVerb.cpp
rm -f qmake_image_collection.cpp
rm -f DataIO.o EditorGUI.o Main.o PnCenterResult.o PnCenterStart.o PnCenterTest.o PnOptionAdjective.o PnOptionCommon.o PnOptionNoun.o PnOptionVerb.o moc_EditorGUI.o moc_MainGUI.o moc_PnCenterResult.o moc_PnCenterStart.o moc_PnCenterTest.o moc_PnOptionVerb.o
rm -f *~ core *.core
g++ -c -pipe -O2 -Wall -W -D_REENTRANT  -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I. -o DataIO.o DataIO.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT  -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I. -o EditorGUI.o EditorGUI.cpp
PnOption.hpp:24: error: ISO C++ forbids declaration of 'EditorGUI' with no type
PnOption.hpp:24: error: expected ';' before '*' token
PnOption.hpp:76: error: 'EditorGUI' has not been declared
PnOption.hpp: In member function 'void PnOption::setParent(int*)':
PnOption.hpp:76: error: 'pParent' was not declared in this scope
PnOption.hpp: In member function 'Element* PnOption::getElementCopy()':
PnOption.hpp:80: error: 'pParent' was not declared in this scope
PnOption.hpp: In member function 'void PnOption::actualizeElement()':
PnOption.hpp:81: error: 'pParent' was not declared in this scope
(...)
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/183963/error-iso-c-forbids-declaration-of-xyz-with-no-type</link><generator>RSS for Node</generator><lastBuildDate>Wed, 23 Sep 2026 14:27:31 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/183963.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 10 Jun 2007 22:46:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to error: ISO C++ forbids declaration of &#x27;xyz&#x27; with no type on Sun, 10 Jun 2007 22:46:44 GMT]]></title><description><![CDATA[<p>Hallo,<br />
Was will einem diese Fehlermeldung eigentlich sagen?</p>
<p>U.a. habe ich folgende abstrakte Klasse geschrieben. In ihr soll ein Zeiger &quot;pParent&quot; enthalten sein. Leider erkennt der Compiler (gcc) &quot;EditorGUI*&quot; nicht als Typ fuer diesen an (in dieser Klasse), egal wie ich es deklariere.</p>
<p>Der gcc meint immer nur:<br />
ISO C++ forbids declaration of 'EditorGUI' with no type... - Aber EditorGUI ist doch der &quot;Type&quot;, Mensch!!! Ich drehe langsam wirklich am Rad, die Information ist so nichtssagend..</p>
<p>Meine erste Vermutung, war eine vergessene Klammer/Semicolon in den EditorGUI Dateien (.cpp/.hpp), hab aber bisher nix gefunden. Vllt hat irgendwer noch irgendwelche Tipps, wo und v.a. nach was ich da eigentlich noch suchen kann?</p>
<pre><code>#ifndef PNOPTION
#define PNOPTION

#include &lt;QtGui&gt;

#include &lt;iostream&gt;

#include &quot;Element.hpp&quot;
#include &quot;EditorGUI.hpp&quot;

class PnOption : public QTabWidget
{
private:
    EditorGUI* pParent; // wird nicht erkannt!!!

public:
    PnOption(){};
    virtual ~PnOption(){};
    virtual void acceptModification()=0;
    virtual void updateContent()=0;

protected:
    void setParent(EditorGUI* p){ pParent = p; };
    QLabel* lbTranslated;
    QLabel* lbUntranslated;
    Element* getElementCopy(){ return pParent-&gt;getElementCopy(); };
    void actualizeElement(){ pParent-&gt;actualizeElement(); };
    virtual void initGUI()=0;
};
#endif
</code></pre>
<pre><code>rm -f moc_EditorGUI.cpp moc_MainGUI.cpp moc_PnCenterResult.cpp moc_PnCenterStart.cpp moc_PnCenterTest.cpp moc_PnOptionVerb.cpp
rm -f qmake_image_collection.cpp
rm -f DataIO.o EditorGUI.o Main.o PnCenterResult.o PnCenterStart.o PnCenterTest.o PnOptionAdjective.o PnOptionCommon.o PnOptionNoun.o PnOptionVerb.o moc_EditorGUI.o moc_MainGUI.o moc_PnCenterResult.o moc_PnCenterStart.o moc_PnCenterTest.o moc_PnOptionVerb.o
rm -f *~ core *.core
g++ -c -pipe -O2 -Wall -W -D_REENTRANT  -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I. -o DataIO.o DataIO.cpp
g++ -c -pipe -O2 -Wall -W -D_REENTRANT  -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I. -o EditorGUI.o EditorGUI.cpp
PnOption.hpp:24: error: ISO C++ forbids declaration of 'EditorGUI' with no type
PnOption.hpp:24: error: expected ';' before '*' token
PnOption.hpp:76: error: 'EditorGUI' has not been declared
PnOption.hpp: In member function 'void PnOption::setParent(int*)':
PnOption.hpp:76: error: 'pParent' was not declared in this scope
PnOption.hpp: In member function 'Element* PnOption::getElementCopy()':
PnOption.hpp:80: error: 'pParent' was not declared in this scope
PnOption.hpp: In member function 'void PnOption::actualizeElement()':
PnOption.hpp:81: error: 'pParent' was not declared in this scope
(...)
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1302829</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1302829</guid><dc:creator><![CDATA[Fabeltier]]></dc:creator><pubDate>Sun, 10 Jun 2007 22:46:44 GMT</pubDate></item><item><title><![CDATA[Reply to error: ISO C++ forbids declaration of &#x27;xyz&#x27; with no type on Mon, 11 Jun 2007 00:03:16 GMT]]></title><description><![CDATA[<p>hi,</p>
<p>wie ist denn EditorGUI deklariert und wohin zeigt der pParent ?</p>
<p>von Ney</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1302838</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1302838</guid><dc:creator><![CDATA[nexperty]]></dc:creator><pubDate>Mon, 11 Jun 2007 00:03:16 GMT</pubDate></item><item><title><![CDATA[Reply to error: ISO C++ forbids declaration of &#x27;xyz&#x27; with no type on Mon, 11 Jun 2007 00:35:12 GMT]]></title><description><![CDATA[<p>Hallo,<br />
EditorGUI ist recht lang (leider), besteht aus einer header und einer Implementierungsdatei.</p>
<p>Das ist die Implementierungsdatei (ich habe mir schon gedacht, vllt liegt es an der Quervernkuepfung mit den includes, aber es aendert sich kaum was bei weglassen, hinzufuegen oder sonstigen Aenderungen.</p>
<pre><code>#ifndef EDITORGUI
#define EDITORGUI

#include &quot;MainGUI.hpp&quot;
#include &quot;PnOption.hpp&quot;
#include &quot;PnOptionCommon.hpp&quot;
#include &quot;PnOptionNoun.hpp&quot;
#include &quot;PnOptionVerb.hpp&quot;
#include &quot;PnOptionAdjective.hpp&quot;
#include &quot;Element.hpp&quot;
#include &lt;iostream&gt; // TODO rm

class QDialog;
class QVector&lt;class T&gt;;
class QLabel;
class QLineEdit;
class QPushButton;
class QRadioButton;
class QStackedLayout;

class EditorGUI : public QDialog
{
    Q_OBJECT

public:
    EditorGUI( MainGUI*, QVector&lt;Element&gt;* list=new QVector&lt;Element&gt;());
    ~EditorGUI();
    QVector&lt;Element&gt;* editableSelection(){ return pEditableSelection; };
    Element* getElementCopy(){ return pElemCpy; };
    void actualizeElement();

private slots:
    // buttons
    void slotNewWord();
    void slotReset();
    void slotAccept();
    void slotEditWord();
    void slotDeleteItem();
    void slotCancel(){ reject(); };

    // listWidget
    void slotSelect(){ init(listWidget-&gt;currentRow()); };

    // radiobuttons
    void slotChangeToCommon();
    void slotChangeToNoun();
    void slotChangeToVerb();
    void slotChangeToAdjective();

private:
    const quint16 NUMBER_OF_TYPES;
    MainGUI* pnParent;
    QVector&lt;Element&gt;* pEditableSelection;
    QListWidget* listWidget;
    Element* pElemCpy;
    QStackedLayout* staOptions;
    PnOption* pnCurrentOption;
    PnOptionCommon* pnOptionCommon;
    PnOptionNoun* pnOptionNoun;
    PnOptionVerb* pnOptionVerb;
    PnOptionAdjective* pnOptionAdjective;
    QLabel* lbTranslation;
    QLineEdit* leTranslation;
    QLabel* lbTranslationContext;
    QLineEdit* leTranslationContext;
    QLabel* lbWord;
    QLineEdit* leWord;
    QLabel* lbWordContext;
    QLineEdit* leWordContext;
    QPushButton *btNew;
    QPushButton *btReset;
    QPushButton *btCancel;
    QPushButton *btOk;
    QPushButton *btEdit;
    QPushButton *btDelete;
    QRadioButton* rb;

    void initGUI();
    void init(qint16);
    void populateListWidget();
    void readElem(const Element&amp; element);
    void writeElem(Element* element);
};

#endif
</code></pre>
<p>Die Implementierung enthaelt folgende Includierungen:</p>
<pre><code>#include &lt;QtGui&gt;
#include &quot;EditorGUI.hpp&quot;
#include &lt;iostream&gt; // TODO rm
(...)
</code></pre>
<p>Ich bin fuer jeden Tipp, was ich machen koennte oder Vermutung dankbar!!!</p>
<p>PS:<br />
EditorGUI erzeugt eine Instanz einer abgeleiteten Klasse von PnOption. Das Parent dieser PnOption Ableitungen soll die Instanz von EditorGUI sein - auf diese soll auch jeweils der Zeiger (=pParent) dann zeigen (aber soweit kommt das Ding ja noch lange nich).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1302841</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1302841</guid><dc:creator><![CDATA[Fabeltier]]></dc:creator><pubDate>Mon, 11 Jun 2007 00:35:12 GMT</pubDate></item><item><title><![CDATA[Reply to error: ISO C++ forbids declaration of &#x27;xyz&#x27; with no type on Mon, 11 Jun 2007 01:35:33 GMT]]></title><description><![CDATA[<p>hi Fabeltier</p>
<p>Fabeltier schrieb:</p>
<blockquote>
<p>Hallo,<br />
EditorGUI* pParent; // wird nicht erkannt!!!<br />
[/code]</p>
</blockquote>
<p>Diese Deklaration sagt nur, dass pParent auf etwas zeigen soll, was ein EditorGUI ist. Insbesondere wird der Konstruktor der Klasse nicht aufgerufen. (Aber das weist du bestimmt.)</p>
<p>Erst wenn du so etwas hast wie</p>
<pre><code class="language-cpp">EditorGUI  etc;
   pParent =  &amp;etc;
</code></pre>
<p>funktionierts. Vielleicht erklärt das, warum EditorGUI* pParent nicht erkannt wird.</p>
<p>Muss dann in void setParent(EditorGUI* p){ pParent = p; }; nicht auch &amp; anstelle * stehen? Aufruf: setParent(*p).</p>
<p>vg tesu</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1302844</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1302844</guid><dc:creator><![CDATA[tesuji]]></dc:creator><pubDate>Mon, 11 Jun 2007 01:35:33 GMT</pubDate></item><item><title><![CDATA[Reply to error: ISO C++ forbids declaration of &#x27;xyz&#x27; with no type on Mon, 11 Jun 2007 02:29:14 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/15591">@tesuji</a> was hat dein Beitrag mit dem Thema zu tun?</p>
<pre><code class="language-cpp">class Foo;

class Blaa
{
    Foo* foo;
}
</code></pre>
<p>Das muss doch funktionieren.</p>
<p>Was macht den dieses Q_OBJECT Macro? Macros sind böse, <em>böse</em>, <em>böööse</em></p>
<p>btw, verwendet doch die cpp-Tags.</p>
<blockquote>
<p>PnOption.hpp:76: error: 'EditorGUI' has not been declared</p>
</blockquote>
<p>Das lässt vermuten das der Compiler den EditorGUI-Typ nicht kennt.</p>
<p>Ausserdem hast du eine zyklische Referenz, in PnOption.hpp includest du EditorGUI.hpp und in EditorGUI.hpp includest du PnOption.hpp:</p>
<pre><code class="language-cpp">#include &quot;Element.hpp&quot; 
#include &quot;EditorGUI.hpp&quot; // hier
</code></pre>
<pre><code class="language-cpp">#include &quot;MainGUI.hpp&quot; 
#include &quot;PnOption.hpp&quot;  // hier
#include &quot;PnOptionCommon.hpp&quot; 
#include &quot;PnOptionNoun.hpp&quot; 
#include &quot;PnOptionVerb.hpp&quot; 
#include &quot;PnOptionAdjective.hpp&quot; 
#include &quot;Element.hpp&quot; 
#include &lt;iostream&gt; // TODO rm
</code></pre>
<p>Ich weis nicht ob das Probleme bereitet, hab schon lang kein C++ Projekt geschrieben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1302846</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1302846</guid><dc:creator><![CDATA[DEvent]]></dc:creator><pubDate>Mon, 11 Jun 2007 02:29:14 GMT</pubDate></item><item><title><![CDATA[Reply to error: ISO C++ forbids declaration of &#x27;xyz&#x27; with no type on Mon, 11 Jun 2007 07:50:55 GMT]]></title><description><![CDATA[<p>Die zyklischen includes sollten kein Problem darstellen, wenn:<br />
- die Includes nicht nötig sind um Klassen bekannt zu machen<br />
- du Include-Guards benutzt, was du scheinbar auch tust (#ifndef bla #define bla etv.)</p>
<p>In diesem Fall scheints aber so zu sein, dass der erste Punkt zutrifft:</p>
<p>wenn der Compiler versucht, einen header zu lesen, der editorgui.h includiert, steht für ihn da in etwa folgendes:</p>
<pre><code class="language-cpp">...
#include editorgui.h
// hier packt der compiler den text von editorgui.h:
 #ifndef editorgui
 #define editorgui // editorgui ist damit DEFINIERT!
 #include pnoption.h
 // hier dann der text von pnoption.h
  #ifndef pnoption
  #define pnoption
  #include editorgui
  // ah, hier nochmal editorgui
   #ifndef editorgui // hier tut der includeguard was er soll, editorgui ist definiert
                     //wird also übersprungen und NICHT gelesen!
   #endif //ende von editorgui
  ...
  Editorgui* pParent;   //!!!! EDITORGUI ist hier UNBEKANNT!
  #endif  //ende von pnoption
 class Editorgui {...}; //hier wird die Klasse erst bekannt...
 #endif //ende von editorgui
</code></pre>
<p>um sowas zu verhindern, gibts zwei wege:</p>
<ol>
<li>wenn du nur Zeiger auf eine Klasse hast und keine ihrer Methoden oder Membervariablen verwendest, ist es nicht nötig, dass der Compiler zu dem Zeitpunkt die ganze definition kennt. eine Deklaration</li>
</ol>
<pre><code class="language-cpp">class EditorGUI;
</code></pre>
<p>reint. die eigentliche Definition kann irgendwann anders kommen.<br />
2) Damit bei den Kreisincludes soclhe fehler nicht passieren, kann man am Anfang jeden headers einfach dei KLasse kurz deklarieren, dann die Includes, dann die eigentliche KLassendefinition.</p>
<p>Allerdings halte ich es für nicht besonders schönen Stil, header nur zur Klassendeklaration zu includieren, da dem Compiler dann mehr Quelltext zugemutet wird als nötig.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1302911</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1302911</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Mon, 11 Jun 2007 07:50:55 GMT</pubDate></item><item><title><![CDATA[Reply to error: ISO C++ forbids declaration of &#x27;xyz&#x27; with no type on Mon, 11 Jun 2007 20:14:02 GMT]]></title><description><![CDATA[<p>Hallo und Danke fuer die Beitraege an alle!!!!</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/15591">@tesuji</a><br />
Ja mir ist schon klar wie man Zeiger initialisiert, darum ging es aber in der Tat nicht. Man denkt vllt zuerst bei der Fehlermeldung an andere Dinge - ich dachte eben an einen vergessenen ; oder ) in einem includeten File, da ich sowas schon hatte - schliesslich wird man langsam wahnsinnig, weil man nichts findet und kontrolliert alles (auch die Initialisierungen) nochmal. Danke trotzdem <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>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/5931">@DEvent</a>:<br />
Q_OBJECT Macro - Ich selber arbeite aesserst ungerne mit Macros, auch nicht um Code (etwa template Deklarationen) zu &quot;verkuerzen&quot;. Das Macro ist notwendig fuer den Signal/Slot-Mechanismus bei Qt, einer Qt-eigenen Signalsteuerung fuer v.a. die GUI's.<br />
Die &quot;zyklische Referenz&quot; bei den Includes ging voll in die richtige Richtung. Auch hier hatte ich schon einiges ausprobiert mit meinem Halbwissen, allerdings erfolglos.</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/9960">@pumuckl</a>:<br />
Die Erlaeuterung hat das Problem schliesslich geloest. Mir war gaenzlich unklar was eig der Unterschied zwischen einer #include Anweisung und einer (seichten) Forward Declaration eig ist. In diese Falle bin ich hineingetappt. Nun hab ich die EditorGUI.hpp, EditorGUI.cpp und PnOption.hpp noch einmal gruendlich angepasst, je nachdem, was im .hpp nicht benoetigt wurde (ausser als Pointer) laeuft und per Forward Declaration. Damit kompilierte es dann auch durch - WOW! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
<p>Es stellt sich allerdings doch etwas die Frage, bei mir, ob man sowas nicht eig auch mit Praeprozessoranweisungen loesen koennte (auch wenn das vllt etwas exotisch klingt, aber dafuer sind die doch eig auch da, oder?)?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1303570</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1303570</guid><dc:creator><![CDATA[Fabeltier]]></dc:creator><pubDate>Mon, 11 Jun 2007 20:14:02 GMT</pubDate></item><item><title><![CDATA[Reply to error: ISO C++ forbids declaration of &#x27;xyz&#x27; with no type on Tue, 12 Jun 2007 00:58:32 GMT]]></title><description><![CDATA[<p>Man kann auch eine &quot;fwd.hpp&quot; machen wo man forward declarations für alle Klassen und Strukturen reinpackt.<br />
Wenn man in irgendeinem Headerfile dann irgendwelche forward declarations includiert man an der Stelle einfach &quot;fwd.hpp&quot;.</p>
<p>Macht die Headerfiles u.U. einiges kürzer und übersichtlicher.</p>
<p>Ich mache es immer so dass jede Library ein &quot;common.hpp&quot; bekommt, und &quot;common.hpp&quot; inkludiert irgendwo &quot;fwd.hpp&quot; oder enthält selbst die ganzen forward declarations.<br />
Jedes andere Headerfile der Library inkludiert dann als erstes &quot;common.h&quot;.</p>
<p>Dadurch ist das Problem mit forward declarations darauf reduziert dass man bei neuen Klassen daran denken muss diese in &quot;fwd.hpp&quot; einzutragen.</p>
<p>Bei grösseren Libraries gibt es u.U. mehrere common.hpp und/oder fwd.hpp, z.B. eines pro grösserem Namespace.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1303657</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1303657</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Tue, 12 Jun 2007 00:58:32 GMT</pubDate></item><item><title><![CDATA[Reply to error: ISO C++ forbids declaration of &#x27;xyz&#x27; with no type on Tue, 12 Jun 2007 10:29:27 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/13960">@hustbaer</a></p>
<p>Das kann man aber nur in kleinen Projekten machen. Wenn ich zum kompilieren 2 Stunden brauche nur weil ich eine forward decl. dazugefügt habe werde ich die Deklaration doch in mein eigenes headerfile schreiben</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1303824</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1303824</guid><dc:creator><![CDATA[templäd]]></dc:creator><pubDate>Tue, 12 Jun 2007 10:29:27 GMT</pubDate></item><item><title><![CDATA[Reply to error: ISO C++ forbids declaration of &#x27;xyz&#x27; with no type on Tue, 12 Jun 2007 10:52:27 GMT]]></title><description><![CDATA[<p>Forward-Deklarationen verlängern doch die Compilezeit nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1303847</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1303847</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Tue, 12 Jun 2007 10:52:27 GMT</pubDate></item><item><title><![CDATA[Reply to error: ISO C++ forbids declaration of &#x27;xyz&#x27; with no type on Tue, 12 Jun 2007 12:10:21 GMT]]></title><description><![CDATA[<blockquote>
<p>Forward-Deklarationen verlängern doch die Compilezeit nicht.</p>
</blockquote>
<p>Doch, so wie templäd es beschrieben hat, und darauf bezieht sich ja hustbaer, d.h. wenn man in die common.h bzw. fwd.h eine neue Klasse (egal ob als Forward Deklaration oder nicht) einträgt, dann wird das ganze Projekt neucompiliert (wäre wie beim MSVC Einträge in der stdafx.h zu ändern)...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1303914</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1303914</guid><dc:creator><![CDATA[Th]]></dc:creator><pubDate>Tue, 12 Jun 2007 12:10:21 GMT</pubDate></item><item><title><![CDATA[Reply to error: ISO C++ forbids declaration of &#x27;xyz&#x27; with no type on Tue, 12 Jun 2007 12:26:40 GMT]]></title><description><![CDATA[<p>Nun gut, das ist richtig.<br />
Header die in allen Projektdateien eingetragen sind sollten halt nicht oft geändert werden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1303932</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1303932</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Tue, 12 Jun 2007 12:26:40 GMT</pubDate></item></channel></rss>