<?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[Problem mit Header-Datei]]></title><description><![CDATA[<p>hier habe ich eine Header-Datei und zwei cpp-Datei.<br />
Nun weiß ich aber nicht wie diese komplieren soll.<br />
Bzw. wo der Fehler ist. Ich benutze Dev-C++ als Compiler.</p>
<p><a href="//kreisModul.cpp">//kreisModul.cpp</a></p>
<pre><code>#include &quot;kreisModul.hpp&quot;
using namespace std;
#include&lt;iostream&gt;
void kreisBerechnung()
{

cout &lt;&lt; endl &lt;&lt; &quot;Radius ? &quot; &lt;&lt;endl;
double radius = 0.0;
cin &gt;&gt; radius;

if (radius &lt; 0)
	{
	cout &lt;&lt; &quot; Falsche Eingabe - Radius muss &gt; 0 sein! &quot; &lt;&lt; endl;
	}
else
	{
	const double PI = 3.14;
	double flaeche = radius * radius * PI;
	double umfang = 2 * PI * radius;

	cout &lt;&lt; &quot; Radius:  &quot; &lt;&lt; radius  &lt;&lt; endl;
	cout &lt;&lt; &quot; Flaeche: &quot; &lt;&lt; flaeche &lt;&lt; endl;
	cout &lt;&lt; &quot; Umfang:  &quot; &lt;&lt; umfang  &lt;&lt; endl;
	}

}
</code></pre>
<pre><code>//kreisModul.h

/*Funktionsdeklarationen mit Include-Wächtern*/

#ifndef _IOSTREAM
#define _IOSTREAM
	#include &lt;iostream&gt;
	using namespace std;
#endif

#ifndef _kreisModul_H_INCLUDED_ 
#define _kreisModul_H_INCLUDED_  

	//function: kreisBerechnung()
	/** Ließt radius eines Kreises ein und gibt die Fläche und den 
	 * Umfang des Kreises aus.
	 * Bei Eingabe einer negativen Zahl erfolgt eine Fehlermeldung.
	 */
	void kreisBerechnung();

	//function: nochmal()
	/** Diese Funktion ermittelt ob der Nutzer die Kreisberechnung 
	 * erneut ausführen möchte und liefert einen Wert vom Typ bool zurück.
	 * nochmal? 
	 * ja = true 
	 * nein = false
	 */
	bool nochmal();

#endif
</code></pre>
<pre><code>//kreisModulTest.cpp

/* Einfache Mainfunktion zum Test unserer externen Datei/Bibliothek kreisModul.h*/

#include &lt;iostream&gt;
using namespace std;

#include &quot;kreisModul.h&quot; // Wir binden eine Fertige Bibliothek in unsere Datei ein
                        // Wir wissen das es darin eine Funktion zur Kreisberechnung gibt!
						// Der Name der Funktion ist kreisBerechnung().
						// Wir nutzen auch die Funktion nochmal() um zu ermitteln ob unsere
						// Bedingung für verlassen true oder false wird.

int main()
{

bool verlassen = false;

while ( verlassen !=true )
	{
	cout &lt;&lt; endl;
	kreisBerechnung();
	verlassen = !(nochmal());   // verlassen =  !  (nochmal? ja = true)  
								// sprich nicht verlassen solange nutzer ja wählt !
	}

return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/326904/problem-mit-header-datei</link><generator>RSS for Node</generator><lastBuildDate>Sat, 30 May 2026 13:12:01 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/326904.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 14 Jul 2014 07:36:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit Header-Datei on Mon, 14 Jul 2014 07:36:36 GMT]]></title><description><![CDATA[<p>hier habe ich eine Header-Datei und zwei cpp-Datei.<br />
Nun weiß ich aber nicht wie diese komplieren soll.<br />
Bzw. wo der Fehler ist. Ich benutze Dev-C++ als Compiler.</p>
<p><a href="//kreisModul.cpp">//kreisModul.cpp</a></p>
<pre><code>#include &quot;kreisModul.hpp&quot;
using namespace std;
#include&lt;iostream&gt;
void kreisBerechnung()
{

cout &lt;&lt; endl &lt;&lt; &quot;Radius ? &quot; &lt;&lt;endl;
double radius = 0.0;
cin &gt;&gt; radius;

if (radius &lt; 0)
	{
	cout &lt;&lt; &quot; Falsche Eingabe - Radius muss &gt; 0 sein! &quot; &lt;&lt; endl;
	}
else
	{
	const double PI = 3.14;
	double flaeche = radius * radius * PI;
	double umfang = 2 * PI * radius;

	cout &lt;&lt; &quot; Radius:  &quot; &lt;&lt; radius  &lt;&lt; endl;
	cout &lt;&lt; &quot; Flaeche: &quot; &lt;&lt; flaeche &lt;&lt; endl;
	cout &lt;&lt; &quot; Umfang:  &quot; &lt;&lt; umfang  &lt;&lt; endl;
	}

}
</code></pre>
<pre><code>//kreisModul.h

/*Funktionsdeklarationen mit Include-Wächtern*/

#ifndef _IOSTREAM
#define _IOSTREAM
	#include &lt;iostream&gt;
	using namespace std;
#endif

#ifndef _kreisModul_H_INCLUDED_ 
#define _kreisModul_H_INCLUDED_  

	//function: kreisBerechnung()
	/** Ließt radius eines Kreises ein und gibt die Fläche und den 
	 * Umfang des Kreises aus.
	 * Bei Eingabe einer negativen Zahl erfolgt eine Fehlermeldung.
	 */
	void kreisBerechnung();

	//function: nochmal()
	/** Diese Funktion ermittelt ob der Nutzer die Kreisberechnung 
	 * erneut ausführen möchte und liefert einen Wert vom Typ bool zurück.
	 * nochmal? 
	 * ja = true 
	 * nein = false
	 */
	bool nochmal();

#endif
</code></pre>
<pre><code>//kreisModulTest.cpp

/* Einfache Mainfunktion zum Test unserer externen Datei/Bibliothek kreisModul.h*/

#include &lt;iostream&gt;
using namespace std;

#include &quot;kreisModul.h&quot; // Wir binden eine Fertige Bibliothek in unsere Datei ein
                        // Wir wissen das es darin eine Funktion zur Kreisberechnung gibt!
						// Der Name der Funktion ist kreisBerechnung().
						// Wir nutzen auch die Funktion nochmal() um zu ermitteln ob unsere
						// Bedingung für verlassen true oder false wird.

int main()
{

bool verlassen = false;

while ( verlassen !=true )
	{
	cout &lt;&lt; endl;
	kreisBerechnung();
	verlassen = !(nochmal());   // verlassen =  !  (nochmal? ja = true)  
								// sprich nicht verlassen solange nutzer ja wählt !
	}

return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2408449</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2408449</guid><dc:creator><![CDATA[Reeko25]]></dc:creator><pubDate>Mon, 14 Jul 2014 07:36:36 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Header-Datei on Mon, 14 Jul 2014 08:02:07 GMT]]></title><description><![CDATA[<blockquote>
<p>Nun weiß ich aber nicht wie diese komplieren soll.</p>
</blockquote>
<p>Mit einem Compiler. Eine IDE kann den Compiler für dich bedienen. Dafür musst du ein Projekt eröffnen und die Dateien hinzufügen. Tutorials gibt es für jede IDE genug.</p>
<blockquote>
<p>Ich benutze Dev-C++ als Compiler.</p>
</blockquote>
<p>Dev-C++ ist kein Compiler sondern eine IDE. Und dazu eine <strong>längst veraltete IDE</strong>.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2408451</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2408451</guid><dc:creator><![CDATA[Columbo]]></dc:creator><pubDate>Mon, 14 Jul 2014 08:02:07 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit Header-Datei on Mon, 14 Jul 2014 08:17:23 GMT]]></title><description><![CDATA[<p>Arcoth schrieb:</p>
<blockquote>
<p>Dev-C++ ist kein Compiler sondern eine IDE. Und dazu eine <strong>längst veraltete IDE</strong>.</p>
</blockquote>
<p>Jain. Es gibt eine Version, die zurzeit aktiv weiterentwickelt wird:<br />
<a href="http://orwelldevcpp.blogspot.co.at/" rel="nofollow">http://orwelldevcpp.blogspot.co.at/</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2408453</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2408453</guid><dc:creator><![CDATA[Singender Holzkübel]]></dc:creator><pubDate>Mon, 14 Jul 2014 08:17:23 GMT</pubDate></item></channel></rss>