<?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[Basisklasse undefiniert]]></title><description><![CDATA[<p>Header</p>
<pre><code>#ifndef KFZ_H
#define KFZ_H
#include &quot;LKW.h&quot;
#include &lt;iostream&gt;

class KFZ
{
    public:

	// Standartkonstruktor
		KFZ();
    // Konstruktor

    KFZ(char* nHersteller, char* Typ, int nTankgr,double nVerbrauch100Km,double nTankinhalt,double nKmStand,double nGewicht);

	// Alles Zeigen

    void Show();

	// Attribute

    private:

	char* Hersteller;
	char* Typ;
    int Tankgr;
    double Verbrauch100Km;
    double Tankinhalt;
    double KmStand;
    double Gewicht;

};

#endif
</code></pre>
<p>KFZ.cpp</p>
<pre><code>#include &lt;iostream&gt;
#include &quot;KFZ.h&quot;

using namespace std;

    KFZ::KFZ(char* nHersteller, char* nTyp,int nTankgr,double nVerbrauch100Km,double nTankinhalt,double nKmStand,double nGewicht):
    Hersteller(nHersteller),Typ(nTyp),Tankgr(nTankgr), Verbrauch100Km(nVerbrauch100Km), Tankinhalt(nTankinhalt), KmStand(nKmStand), Gewicht(nGewicht) {}

void KFZ::Show()
{
	cout&lt;&lt; &quot;Hersteller : &quot;&lt;&lt; Hersteller&lt;&lt;endl;
	cout&lt;&lt; &quot;Typ : &quot;&lt;&lt; Typ&lt;&lt;endl;
    cout&lt;&lt; &quot;Tankgroeße : &quot;&lt;&lt; Tankgr &lt;&lt;endl;
    cout&lt;&lt; &quot;Verbrauch auf 100 Km : &quot;&lt;&lt; Verbrauch100Km &lt;&lt;endl;
    cout&lt;&lt; &quot;Tankinhalt zurzeit : &quot;&lt;&lt; Tankinhalt &lt;&lt;endl;
    cout&lt;&lt; &quot;Aktueller Km Stand : &quot;&lt;&lt; KmStand &lt;&lt;endl;
    cout&lt;&lt; &quot;Zulässiges Gewicht : &quot;&lt;&lt; Gewicht &lt;&lt;endl;

}
</code></pre>
<p>LKW.h</p>
<pre><code>#ifndef LKW_H
#define LKW_H
#include &lt;iostream&gt;
#include &quot;KFZ.h&quot;

class LKW : public KFZ
{
    public:

    // Konstruktor

    LKW(int nAnzahlAchsen,int nAnhaenger, double nlaengeMeter);

	void Show();
	// Attribute

    private:

	int AnzahlAchsen;
	int Anhaenger;
	double laengeMeter;

};
#endif
</code></pre>
<p>LKW.cpp</p>
<pre><code>#include &lt;iostream&gt;
#include &quot;LKW.h&quot;

using namespace std;

LKW::LKW(int nAnzahlAchsen,int nAnhaenger, double nlaengeMeter):
AnzahlAchsen(nAnzahlAchsen),Anhaenger(nAnhaenger),laengeMeter(nlaengeMeter){}

//show
void LKW::Show()
{
	cout&lt;&lt; &quot;Anzahl der Achsen : &quot;&lt;&lt; AnzahlAchsen&lt;&lt;endl;
	cout&lt;&lt; &quot;Typ : &quot;&lt;&lt; Anhaenger&lt;&lt;endl;
    cout&lt;&lt; &quot;Tankgroeße : &quot;&lt;&lt; laengeMeter&lt;&lt;endl;

}
</code></pre>
<p>main.cpp</p>
<pre><code>#include &lt;iostream&gt;
#include &quot;KFZ.h&quot;
#include &quot;LKW.h&quot;

using namespace std;

int main()
{

    KFZ Audi(&quot;Audi&quot;,&quot;R8&quot;,50,16.8,30.5,100000,1.0);

	LKW Mercedes(2,1,40.5);

	Audi.Show();
	Mercedes.Show();

	system(&quot;pause&quot;);
    return 0;
}
</code></pre>
<p>Fehlermeldung.</p>
<p>1&gt;------ Erstellen gestartet: Projekt: KFZ, Konfiguration: Debug Win32 ------<br />
1&gt; main.cpp<br />
1&gt;c:\users\grhei_000\documents\visual studio 2010\projects\kfz\kfz\lkw.h(8): error C2504: 'KFZ': Basisklasse undefiniert<br />
1&gt; LKW.cpp<br />
1&gt; KFZ.cpp<br />
1&gt;c:\users\grhei_000\documents\visual studio 2010\projects\kfz\kfz\lkw.h(8): error C2504: 'KFZ': Basisklasse undefiniert<br />
1&gt; Code wird generiert...<br />
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========</p>
<p>Leider weis ich nicht wo sich der Fehler versteckt ...</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/313282/basisklasse-undefiniert</link><generator>RSS for Node</generator><lastBuildDate>Sun, 02 Aug 2026 07:50:02 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/313282.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 26 Jan 2013 14:07:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Basisklasse undefiniert on Sat, 26 Jan 2013 14:07:22 GMT]]></title><description><![CDATA[<p>Header</p>
<pre><code>#ifndef KFZ_H
#define KFZ_H
#include &quot;LKW.h&quot;
#include &lt;iostream&gt;

class KFZ
{
    public:

	// Standartkonstruktor
		KFZ();
    // Konstruktor

    KFZ(char* nHersteller, char* Typ, int nTankgr,double nVerbrauch100Km,double nTankinhalt,double nKmStand,double nGewicht);

	// Alles Zeigen

    void Show();

	// Attribute

    private:

	char* Hersteller;
	char* Typ;
    int Tankgr;
    double Verbrauch100Km;
    double Tankinhalt;
    double KmStand;
    double Gewicht;

};

#endif
</code></pre>
<p>KFZ.cpp</p>
<pre><code>#include &lt;iostream&gt;
#include &quot;KFZ.h&quot;

using namespace std;

    KFZ::KFZ(char* nHersteller, char* nTyp,int nTankgr,double nVerbrauch100Km,double nTankinhalt,double nKmStand,double nGewicht):
    Hersteller(nHersteller),Typ(nTyp),Tankgr(nTankgr), Verbrauch100Km(nVerbrauch100Km), Tankinhalt(nTankinhalt), KmStand(nKmStand), Gewicht(nGewicht) {}

void KFZ::Show()
{
	cout&lt;&lt; &quot;Hersteller : &quot;&lt;&lt; Hersteller&lt;&lt;endl;
	cout&lt;&lt; &quot;Typ : &quot;&lt;&lt; Typ&lt;&lt;endl;
    cout&lt;&lt; &quot;Tankgroeße : &quot;&lt;&lt; Tankgr &lt;&lt;endl;
    cout&lt;&lt; &quot;Verbrauch auf 100 Km : &quot;&lt;&lt; Verbrauch100Km &lt;&lt;endl;
    cout&lt;&lt; &quot;Tankinhalt zurzeit : &quot;&lt;&lt; Tankinhalt &lt;&lt;endl;
    cout&lt;&lt; &quot;Aktueller Km Stand : &quot;&lt;&lt; KmStand &lt;&lt;endl;
    cout&lt;&lt; &quot;Zulässiges Gewicht : &quot;&lt;&lt; Gewicht &lt;&lt;endl;

}
</code></pre>
<p>LKW.h</p>
<pre><code>#ifndef LKW_H
#define LKW_H
#include &lt;iostream&gt;
#include &quot;KFZ.h&quot;

class LKW : public KFZ
{
    public:

    // Konstruktor

    LKW(int nAnzahlAchsen,int nAnhaenger, double nlaengeMeter);

	void Show();
	// Attribute

    private:

	int AnzahlAchsen;
	int Anhaenger;
	double laengeMeter;

};
#endif
</code></pre>
<p>LKW.cpp</p>
<pre><code>#include &lt;iostream&gt;
#include &quot;LKW.h&quot;

using namespace std;

LKW::LKW(int nAnzahlAchsen,int nAnhaenger, double nlaengeMeter):
AnzahlAchsen(nAnzahlAchsen),Anhaenger(nAnhaenger),laengeMeter(nlaengeMeter){}

//show
void LKW::Show()
{
	cout&lt;&lt; &quot;Anzahl der Achsen : &quot;&lt;&lt; AnzahlAchsen&lt;&lt;endl;
	cout&lt;&lt; &quot;Typ : &quot;&lt;&lt; Anhaenger&lt;&lt;endl;
    cout&lt;&lt; &quot;Tankgroeße : &quot;&lt;&lt; laengeMeter&lt;&lt;endl;

}
</code></pre>
<p>main.cpp</p>
<pre><code>#include &lt;iostream&gt;
#include &quot;KFZ.h&quot;
#include &quot;LKW.h&quot;

using namespace std;

int main()
{

    KFZ Audi(&quot;Audi&quot;,&quot;R8&quot;,50,16.8,30.5,100000,1.0);

	LKW Mercedes(2,1,40.5);

	Audi.Show();
	Mercedes.Show();

	system(&quot;pause&quot;);
    return 0;
}
</code></pre>
<p>Fehlermeldung.</p>
<p>1&gt;------ Erstellen gestartet: Projekt: KFZ, Konfiguration: Debug Win32 ------<br />
1&gt; main.cpp<br />
1&gt;c:\users\grhei_000\documents\visual studio 2010\projects\kfz\kfz\lkw.h(8): error C2504: 'KFZ': Basisklasse undefiniert<br />
1&gt; LKW.cpp<br />
1&gt; KFZ.cpp<br />
1&gt;c:\users\grhei_000\documents\visual studio 2010\projects\kfz\kfz\lkw.h(8): error C2504: 'KFZ': Basisklasse undefiniert<br />
1&gt; Code wird generiert...<br />
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========</p>
<p>Leider weis ich nicht wo sich der Fehler versteckt ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2293607</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2293607</guid><dc:creator><![CDATA[MisterBasiklasse]]></dc:creator><pubDate>Sat, 26 Jan 2013 14:07:22 GMT</pubDate></item><item><title><![CDATA[Reply to Basisklasse undefiniert on Sat, 26 Jan 2013 14:09:20 GMT]]></title><description><![CDATA[<p>Der Fehler befindet sich in der dritten Zeile der ersten genannten Datei.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2293608</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2293608</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sat, 26 Jan 2013 14:09:20 GMT</pubDate></item><item><title><![CDATA[Reply to Basisklasse undefiniert on Sat, 26 Jan 2013 14:11:06 GMT]]></title><description><![CDATA[<p>Deine Header inkludieren sich gegenseitig.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2293610</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2293610</guid><dc:creator><![CDATA[dot]]></dc:creator><pubDate>Sat, 26 Jan 2013 14:11:06 GMT</pubDate></item><item><title><![CDATA[Reply to Basisklasse undefiniert on Sat, 26 Jan 2013 14:14:03 GMT]]></title><description><![CDATA[<p>Nach dem Entfernen des unötigen #include &quot;LKW.h&quot; in der Kfz.h ist der fehler behoben... und dieser neue taucht auf</p>
<p>1&gt;------ Erstellen gestartet: Projekt: KFZ, Konfiguration: Debug Win32 ------<br />
1&gt; main.cpp<br />
1&gt; KFZ.cpp<br />
1&gt; Code wird generiert...<br />
1&gt; Kompilieren...<br />
1&gt; LKW.cpp<br />
1&gt; Code wird generiert...<br />
1&gt;LKW.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;&quot;public: __thiscall KFZ::KFZ(void)&quot; (??0KFZ@@QAE@XZ)&quot; in Funktion &quot;&quot;public: __thiscall LKW::LKW(int,int,double)&quot; (??0LKW@@QAE@HHN@Z)&quot;.<br />
1&gt;c:\users\grhei_000\documents\visual studio 2010\Projects\KFZ\Debug\KFZ.exe : fatal error LNK1120: 1 nicht aufgelöste externe Verweise.<br />
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2293611</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2293611</guid><dc:creator><![CDATA[MisterBasiklasse]]></dc:creator><pubDate>Sat, 26 Jan 2013 14:14:03 GMT</pubDate></item><item><title><![CDATA[Reply to Basisklasse undefiniert on Sat, 26 Jan 2013 14:21:21 GMT]]></title><description><![CDATA[<p>Wieso bleibst Du nicht im ursprünglichen Thread?<br />
<a href="http://www.c-plusplus.net/forum/313240" rel="nofollow">http://www.c-plusplus.net/forum/313240</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2293612</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2293612</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Sat, 26 Jan 2013 14:21:21 GMT</pubDate></item></channel></rss>