<?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 Problem]]></title><description><![CDATA[<p>Hab ein eigenartiges Include Problem bei meinem Projekt:</p>
<p>Klasse A</p>
<pre><code class="language-cpp">#if !defined (CommonMicropross_h)
#define CommonMicropross_h

#if !defined(Bx1pMicropross_h)
    #include &quot;Bx1pMicropross.h&quot;
#endif //!defined(Bx1pMicropross_h)

#if !defined(PrelamData_h)
    #include &quot;PrelamData.h&quot;
#endif //!defined(PrelamData_h)

#if !defined(TpgmData_h)
    #include &quot;TpgmData.h&quot;
#endif //!defined(TpgmData_h)

#if !defined(MicroprossData_h)
    #include &quot;MicroprossData.h&quot;
#endif //!defined(MicroprossData_h)

#include &lt;stdio.h&gt;
#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;windows.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;fstream&gt;
#include &lt;sstream&gt;

using namespace std;

class CommonMicropross
{
...
}
</code></pre>
<p>Klasse B</p>
<pre><code class="language-cpp">#if !defined (Bx1pMicropross_h)
#define Bx1pMicropross_h

#if !defined(CommonMicropross_h)
    #include &quot;CommonMicropross.h&quot;
#endif //!defined(CommonMicropross_h)

#if !defined(GlobalData_h)
    #include &quot;GlobalData.h&quot;
#endif //!defined(GlobalData_h)

#if !defined(TpgmData_h)
    #include &quot;TpgmData.h&quot;
#endif //!defined(TpgmData_h)

#if !defined(OperatorData_h)
    #include &quot;OperatorData.h&quot;
#endif //!defined(OperatorData_h)

#if !defined(LotData_h)
    #include &quot;LotData.h&quot;
#endif //!defined(LotData_h)

#if !defined(TestData_h)
    #include &quot;TestData.h&quot;
#endif //!defined(TestData_h)

#if !defined(MicroprossResponseStructure_h)
    #include &quot;MicroprossResponseStructure.h&quot;
#endif //!defined(MicroprossResponseStructure_h)

#if !defined(TimeTest_h)
    #include &quot;TimeTest.h&quot;
#endif //!defined(TimeTest_h)

#include &lt;stdio.h&gt;
#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;windows.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;map&gt;

using namespace std;

class Bx1pMicropross 
{
...
}
</code></pre>
<p>Bekomme nun folgende Fehlermeldungen:</p>
<pre><code>commonmicropross.h(46) : error C2061: syntax error : identifier 'Bx1pMicropross'
bx1pmicropross.h(69) : error C2061: syntax error : identifier 'CommonMicropross'
</code></pre>
<p>Obwohl laut header Dateien alles eingebunden wurde !</p>
<p>Hat jemand eine Ahnung was da falsch läuft ?!</p>
<p>Danke und MfG</p>
<p>leon</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/220034/include-problem</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 13:07:09 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/220034.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 11 Aug 2008 08:22:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Include Problem on Mon, 11 Aug 2008 08:22:34 GMT]]></title><description><![CDATA[<p>Hab ein eigenartiges Include Problem bei meinem Projekt:</p>
<p>Klasse A</p>
<pre><code class="language-cpp">#if !defined (CommonMicropross_h)
#define CommonMicropross_h

#if !defined(Bx1pMicropross_h)
    #include &quot;Bx1pMicropross.h&quot;
#endif //!defined(Bx1pMicropross_h)

#if !defined(PrelamData_h)
    #include &quot;PrelamData.h&quot;
#endif //!defined(PrelamData_h)

#if !defined(TpgmData_h)
    #include &quot;TpgmData.h&quot;
#endif //!defined(TpgmData_h)

#if !defined(MicroprossData_h)
    #include &quot;MicroprossData.h&quot;
#endif //!defined(MicroprossData_h)

#include &lt;stdio.h&gt;
#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;windows.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;fstream&gt;
#include &lt;sstream&gt;

using namespace std;

class CommonMicropross
{
...
}
</code></pre>
<p>Klasse B</p>
<pre><code class="language-cpp">#if !defined (Bx1pMicropross_h)
#define Bx1pMicropross_h

#if !defined(CommonMicropross_h)
    #include &quot;CommonMicropross.h&quot;
#endif //!defined(CommonMicropross_h)

#if !defined(GlobalData_h)
    #include &quot;GlobalData.h&quot;
#endif //!defined(GlobalData_h)

#if !defined(TpgmData_h)
    #include &quot;TpgmData.h&quot;
#endif //!defined(TpgmData_h)

#if !defined(OperatorData_h)
    #include &quot;OperatorData.h&quot;
#endif //!defined(OperatorData_h)

#if !defined(LotData_h)
    #include &quot;LotData.h&quot;
#endif //!defined(LotData_h)

#if !defined(TestData_h)
    #include &quot;TestData.h&quot;
#endif //!defined(TestData_h)

#if !defined(MicroprossResponseStructure_h)
    #include &quot;MicroprossResponseStructure.h&quot;
#endif //!defined(MicroprossResponseStructure_h)

#if !defined(TimeTest_h)
    #include &quot;TimeTest.h&quot;
#endif //!defined(TimeTest_h)

#include &lt;stdio.h&gt;
#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;windows.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;map&gt;

using namespace std;

class Bx1pMicropross 
{
...
}
</code></pre>
<p>Bekomme nun folgende Fehlermeldungen:</p>
<pre><code>commonmicropross.h(46) : error C2061: syntax error : identifier 'Bx1pMicropross'
bx1pmicropross.h(69) : error C2061: syntax error : identifier 'CommonMicropross'
</code></pre>
<p>Obwohl laut header Dateien alles eingebunden wurde !</p>
<p>Hat jemand eine Ahnung was da falsch läuft ?!</p>
<p>Danke und MfG</p>
<p>leon</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1562496</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1562496</guid><dc:creator><![CDATA[leon22]]></dc:creator><pubDate>Mon, 11 Aug 2008 08:22:34 GMT</pubDate></item><item><title><![CDATA[Reply to Include Problem on Mon, 11 Aug 2008 09:22:59 GMT]]></title><description><![CDATA[<p>Fehlt in Klasse B nicht das schließende endif vom ersten if?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1562536</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1562536</guid><dc:creator><![CDATA[Fellhuhn]]></dc:creator><pubDate>Mon, 11 Aug 2008 09:22:59 GMT</pubDate></item><item><title><![CDATA[Reply to Include Problem on Mon, 11 Aug 2008 09:24:33 GMT]]></title><description><![CDATA[<p>Du hast bei deinen beiden Header-Dateien einen sogenannten Cross-Include, d.h. die Dateien binden sich gegenseitig ein.<br />
Du mußt also dein Klassen-Design nochmals überarbeiten. Du solltest eine möglichst eindeutige hierarchische Struktur entwickeln.</p>
<p>Generell verwendest du viel zu viele Includes in den Header-Dateien. Für Referenzen und Zeiger reichen Vorwärtsdeklarationen (forward declarations).</p>
<p>Und für die Einbindung der Standard C++ IO-Klassen reicht</p>
<pre><code class="language-cpp">#include &lt;iosfwd&gt;
</code></pre>
<p>Nur die Source (CPP)-Dateien sollten dann die wirklich benötigten Header-Dateien einbinden.</p>
<p>Je nach Compiler kannst du aber auch sog. &quot;Vorcompilierte Header-Dateien&quot; erzeugen lassen (so daß du nur an einer zentralen Stelle die häufig verwendeten Header-Dateien angibst.</p>
<p>Die Einbindung von &lt;windows.h&gt; kann außerdem auch noch zu vielen weiteren Fehlern führen (wegen der Verwendung diverser Makros), d.h. diese sollte nur an expliziter Stelle verwendet werden (nicht für das gesamte Projekt).</p>
<p>Und NIEMALS solltest du &quot;using namespace std; &quot; in Header-Dateien verwenden!!!<br />
Hierzu sollte es auch einen Thread in der FAQ geben...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1562537</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1562537</guid><dc:creator><![CDATA[Th69]]></dc:creator><pubDate>Mon, 11 Aug 2008 09:24:33 GMT</pubDate></item><item><title><![CDATA[Reply to Include Problem on Mon, 11 Aug 2008 10:56:33 GMT]]></title><description><![CDATA[<p>Danke !</p>
<p>Stichwort Vorwärtsdeklaration war die Lösung des Problems !</p>
<p>mfg leon</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1562606</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1562606</guid><dc:creator><![CDATA[leon22]]></dc:creator><pubDate>Mon, 11 Aug 2008 10:56:33 GMT</pubDate></item></channel></rss>