<?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[Funktionskopf fehlt...Woran liegt das ?]]></title><description><![CDATA[<p>Hi Leute</p>
<p>hab hier ein kleines Problem mit meinem Prog, mein Compiler spuckt mir jedes mal folgende Meldung aus :</p>
<p>error C2447: Funktionskopf fehlt - Parameterliste im alten Stil?</p>
<p>Ich weiß echt nicht woran das liegen könnte,bin schon einige male den Source durchgegangen.<br />
Na ja ich hoff da kann mir einer von euch weiterhelfen.<br />
Hier ist der Source:</p>
<pre><code>#include &lt;iostream.h&gt;

// Deklaration der Klasse Rectangle

class Rectangle
{

public:
	// Konstruktoren
	Rectangle(int width, int height);
	~Rectangle();

	//Zugriffsfunktionen
	int GetHeight() const {return itsHeight;}
	int GetWidth() const {return itsWidth;}
	int GetArea() const {return itsHeight*itsWidth;}
	int GetPerim() const {return 2*itsHeight + 2*itsWidth;}
	void SetSize(int newWidth, int newHeight);

	// verschiedene Methoden

private:

	int itsHeight;
	int itsWidth;

};

//Implementierungen der Methoden

void Rectangle::SetSize(int width, int height)
{
	itsHeight=height;
	itsWidth=width;
}

Rectangle::Rectangle(int width, int height)
{
	itsWidth=width;
	itsHeight=height;
}

Rectangle::~Rectangle() {};

int DoMenu();
void DoDrawRect(Rectangle);
void DoGetArea(Rectangle);
void DoGetPerim(Rectangle);

int main()
{
	//ein rechteck mit den Werten 30,5 initialisieren

	Rectangle theRect(30,5);

	int fQuit=false;

	while (!fQuit)
	{
		int choice;
		choice=DoMenu();
		if(choice&lt;1 || choice &gt; 5)
		{
			cout &lt;&lt;&quot;\nAuswahl war ungueltig.Bitte erneut eingeben.\n\n&quot;;
			continue;
		}

		switch(choice)

		{
		case 1:
				DoDrawRect(theRect);
				break;
		case 2:
				DoGetArea(theRect);
				break;
		case 3:
				DoGetPerim(theRect);
				break;
		case 4:
				int newLength, newWidth;
				cout &lt;&lt; &quot;\nNeue Breite: &quot;;
				cin &gt;&gt; newWidth;
				cout &lt;&lt;&quot;\nNeue Hoehe: &quot;;
				cin &gt;&gt; newLength;
				theRect.SetSize(newWidth, newLength);
				DoDrawRect(theRect);
				break;
		case 5:
			fQuit = true;
			cout&lt;&lt; &quot;\nVerlassen...\n\n&quot;;
				break;
		default:
			cout &lt;&lt; &quot;Fehler beim Auswaehlen!\n&quot;;
			fQuit=true;
			break;
		}
	}
	return 0;
}

int DoMenu();
{

        int choice;
	cout &lt;&lt;&quot;\n\n   *** Menu ***   \n\n&quot;;
	cout &lt;&lt;&quot;(1) Rechteck zeichnen\n&quot;;
	cout &lt;&lt;&quot;(2) Flaeche\n&quot;;
	cout &lt;&lt;&quot;(3) Umfang\n&quot;;
	cout &lt;&lt;&quot;(4) Groesse veraendern\n&quot;;
	cout &lt;&lt;&quot;(5) Beenden;\n&quot;;
	cin &gt;&gt; choice;

	return choice;
}

void DoDrawRect(Rectangle theRect)
{

	int height=theRect.GetHeight();
	int width=theRect.GetWidth();

	for (int i=0;i&lt;height;i++)
	{
		for(int j=0;j&lt;width;j++)

			cout &lt;&lt;&quot;*&quot;;
			cout &lt;&lt;&quot;\n&quot;;

	}

}

void DoGetArea(Rectangle theRect)
{
	cout &lt;&lt;&quot;Flaeche: &quot; &lt;&lt; theRect.GetArea() &lt;&lt;endl;
}

void DoGetPerim(Rectangle theRect)
{
	cout &lt;&lt;&quot;Umfang: &quot; &lt;&lt; theRect.GetPerim() &lt;&lt;endl;
}
</code></pre>
<p>Und hier meldet mir der Compiler nen Fehler:</p>
<pre><code>int DoMenu();
{

        int choice;
	cout &lt;&lt;&quot;\n\n   *** Menu ***   \n\n&quot;;
	cout &lt;&lt;&quot;(1) Rechteck zeichnen\n&quot;;
	cout &lt;&lt;&quot;(2) Flaeche\n&quot;;
	cout &lt;&lt;&quot;(3) Umfang\n&quot;;
	cout &lt;&lt;&quot;(4) Groesse veraendern\n&quot;;
	cout &lt;&lt;&quot;(5) Beenden;\n&quot;;
	cin &gt;&gt; choice;

	return choice;
}
</code></pre>
<p>Soll an der gescheiften Klammer liegen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
<p>Also ich danke schonma für alle hilfreichen Posts.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/156085/funktionskopf-fehlt-woran-liegt-das</link><generator>RSS for Node</generator><lastBuildDate>Tue, 08 Sep 2026 18:10:11 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/156085.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 12 Aug 2006 23:35:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Funktionskopf fehlt...Woran liegt das ? on Sat, 12 Aug 2006 23:51:55 GMT]]></title><description><![CDATA[<p>Hi Leute</p>
<p>hab hier ein kleines Problem mit meinem Prog, mein Compiler spuckt mir jedes mal folgende Meldung aus :</p>
<p>error C2447: Funktionskopf fehlt - Parameterliste im alten Stil?</p>
<p>Ich weiß echt nicht woran das liegen könnte,bin schon einige male den Source durchgegangen.<br />
Na ja ich hoff da kann mir einer von euch weiterhelfen.<br />
Hier ist der Source:</p>
<pre><code>#include &lt;iostream.h&gt;

// Deklaration der Klasse Rectangle

class Rectangle
{

public:
	// Konstruktoren
	Rectangle(int width, int height);
	~Rectangle();

	//Zugriffsfunktionen
	int GetHeight() const {return itsHeight;}
	int GetWidth() const {return itsWidth;}
	int GetArea() const {return itsHeight*itsWidth;}
	int GetPerim() const {return 2*itsHeight + 2*itsWidth;}
	void SetSize(int newWidth, int newHeight);

	// verschiedene Methoden

private:

	int itsHeight;
	int itsWidth;

};

//Implementierungen der Methoden

void Rectangle::SetSize(int width, int height)
{
	itsHeight=height;
	itsWidth=width;
}

Rectangle::Rectangle(int width, int height)
{
	itsWidth=width;
	itsHeight=height;
}

Rectangle::~Rectangle() {};

int DoMenu();
void DoDrawRect(Rectangle);
void DoGetArea(Rectangle);
void DoGetPerim(Rectangle);

int main()
{
	//ein rechteck mit den Werten 30,5 initialisieren

	Rectangle theRect(30,5);

	int fQuit=false;

	while (!fQuit)
	{
		int choice;
		choice=DoMenu();
		if(choice&lt;1 || choice &gt; 5)
		{
			cout &lt;&lt;&quot;\nAuswahl war ungueltig.Bitte erneut eingeben.\n\n&quot;;
			continue;
		}

		switch(choice)

		{
		case 1:
				DoDrawRect(theRect);
				break;
		case 2:
				DoGetArea(theRect);
				break;
		case 3:
				DoGetPerim(theRect);
				break;
		case 4:
				int newLength, newWidth;
				cout &lt;&lt; &quot;\nNeue Breite: &quot;;
				cin &gt;&gt; newWidth;
				cout &lt;&lt;&quot;\nNeue Hoehe: &quot;;
				cin &gt;&gt; newLength;
				theRect.SetSize(newWidth, newLength);
				DoDrawRect(theRect);
				break;
		case 5:
			fQuit = true;
			cout&lt;&lt; &quot;\nVerlassen...\n\n&quot;;
				break;
		default:
			cout &lt;&lt; &quot;Fehler beim Auswaehlen!\n&quot;;
			fQuit=true;
			break;
		}
	}
	return 0;
}

int DoMenu();
{

        int choice;
	cout &lt;&lt;&quot;\n\n   *** Menu ***   \n\n&quot;;
	cout &lt;&lt;&quot;(1) Rechteck zeichnen\n&quot;;
	cout &lt;&lt;&quot;(2) Flaeche\n&quot;;
	cout &lt;&lt;&quot;(3) Umfang\n&quot;;
	cout &lt;&lt;&quot;(4) Groesse veraendern\n&quot;;
	cout &lt;&lt;&quot;(5) Beenden;\n&quot;;
	cin &gt;&gt; choice;

	return choice;
}

void DoDrawRect(Rectangle theRect)
{

	int height=theRect.GetHeight();
	int width=theRect.GetWidth();

	for (int i=0;i&lt;height;i++)
	{
		for(int j=0;j&lt;width;j++)

			cout &lt;&lt;&quot;*&quot;;
			cout &lt;&lt;&quot;\n&quot;;

	}

}

void DoGetArea(Rectangle theRect)
{
	cout &lt;&lt;&quot;Flaeche: &quot; &lt;&lt; theRect.GetArea() &lt;&lt;endl;
}

void DoGetPerim(Rectangle theRect)
{
	cout &lt;&lt;&quot;Umfang: &quot; &lt;&lt; theRect.GetPerim() &lt;&lt;endl;
}
</code></pre>
<p>Und hier meldet mir der Compiler nen Fehler:</p>
<pre><code>int DoMenu();
{

        int choice;
	cout &lt;&lt;&quot;\n\n   *** Menu ***   \n\n&quot;;
	cout &lt;&lt;&quot;(1) Rechteck zeichnen\n&quot;;
	cout &lt;&lt;&quot;(2) Flaeche\n&quot;;
	cout &lt;&lt;&quot;(3) Umfang\n&quot;;
	cout &lt;&lt;&quot;(4) Groesse veraendern\n&quot;;
	cout &lt;&lt;&quot;(5) Beenden;\n&quot;;
	cin &gt;&gt; choice;

	return choice;
}
</code></pre>
<p>Soll an der gescheiften Klammer liegen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
<p>Also ich danke schonma für alle hilfreichen Posts.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1116301</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1116301</guid><dc:creator><![CDATA[turner]]></dc:creator><pubDate>Sat, 12 Aug 2006 23:51:55 GMT</pubDate></item><item><title><![CDATA[Reply to Funktionskopf fehlt...Woran liegt das ? on Sat, 12 Aug 2006 23:53:42 GMT]]></title><description><![CDATA[<p>Das Semikolon hinter der Parameterliste ist zu viel.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1116305</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1116305</guid><dc:creator><![CDATA[Michael E.]]></dc:creator><pubDate>Sat, 12 Aug 2006 23:53:42 GMT</pubDate></item><item><title><![CDATA[Reply to Funktionskopf fehlt...Woran liegt das ? on Sat, 12 Aug 2006 23:55:00 GMT]]></title><description><![CDATA[<p>waaah was für ein leichtsinnsfehler hehe....ich danke dir für die schnelle Hilfe <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1116306</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1116306</guid><dc:creator><![CDATA[turner]]></dc:creator><pubDate>Sat, 12 Aug 2006 23:55:00 GMT</pubDate></item><item><title><![CDATA[Reply to Funktionskopf fehlt...Woran liegt das ? on Sun, 13 Aug 2006 06:37:45 GMT]]></title><description><![CDATA[<p>Das sollte man mal in die FAQs stellen, weil wir es schon so oft hatten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1116324</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1116324</guid><dc:creator><![CDATA[ab in die FAQ]]></dc:creator><pubDate>Sun, 13 Aug 2006 06:37:45 GMT</pubDate></item></channel></rss>