<?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[Schulaufgabe: Kleine Fehler.]]></title><description><![CDATA[<p>Ich bins wieder <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>
<p>Wie der Titel schon sagt, hab ich diesmal ein anderes Problem mit einer Schulaufgabe.</p>
<p>Hier die Aufgabe als Bild. <a href="http://s14.directupload.net/file/d/3297/harrufdt_png.htm" rel="nofollow">http://s14.directupload.net/file/d/3297/harrufdt_png.htm</a></p>
<p>Also eigentlich ist die nicht schwer die haben wir auch im Unterricht gemacht gehabt, verstehen tu ich sie. Aber dennoch gibt es 1-2 kleine Fehler die ich einfach nicht beseitigen kann, wahrscheinlich fehlt es mir ganz einfach an Erfahrung.</p>
<p>Hier ist es wie ich es mir so denke:</p>
<pre><code>#include &quot;stdafx.h 
enum sex
{
	male,
	female
};

struct Date
{
	unsigned short day, month, year;
};

struct AddressItem
{
	char prename[40], familyname[40];
		Date Born;
		sex s;
	char livingPlace[100];
};
void FillAddress(AddressItem &amp;A, char _prename[], char _familyname[],
	unsigned short _day, unsigned short _month,
	unsigned short _year, sex _s, char _livingPlace[]);
{
	strcpy_s (A.prename, _prename);
	strcpy_s (A.familyname, _familyname);
	A.Born.day = _day;
	A.Born.month = _month;
	A.Born.year = _year;
	A.s = _s
	strcpy_s (A.livingPlace, _livingPlace);
}

void Display (AddressItem &amp;A)
{
	switch (A.s)
	{
	case male:
		printf(&quot;Herr&quot;);
		break;

	case female:
		printf(&quot;Frau&quot;);
		break;
	}

	printf(&quot;Vorname, Nachname %s, %s \n&quot;, A.prename, A.familyname);
	printf(&quot;Geburtsdatum: %u .%u .%u \n&quot;, A.Born.day, A.Born.month, A.Born.year);
	printf(&quot;Wohnort: %s \n&quot;, A.livingPlace);
}

void main()

{
	AddressItem person1;
	FillAddress(person1,&quot;Peter&quot;,&quot;Mueller&quot;,1,4,1968,male,&quot;Blumenstr. 53&quot;);
	Display(person1);
}
</code></pre>
<p>ps: das mit dem Namen hab ich geändert weil ich keine Lust hatte so viel rein zu tippen. (Peter Müller)</p>
<p>Fehlercode:</p>
<pre><code>1&gt;------ Build started: Project: Aufgabe_2, Configuration: Debug Win32 ------
1&gt;Compiling...
1&gt;Aufgabe_2.cpp
1&gt;c:\users\xx\documents\visual studio 2005\projects\aufgabe_2\aufgabe_2.cpp(1) : error C2001: newline in constant
1&gt;c:\users\xx\documents\visual studio 2005\projects\aufgabe_2\aufgabe_2.cpp(23) : error C2447: '{' : missing function header (old-style formal list?)
1&gt;Build log was saved at &quot;file://c:\Users\xx\Documents\Visual Studio 2005\Projects\Aufgabe_2\Debug\BuildLog.htm&quot;
1&gt;Aufgabe_2 - 2 error(s), 0 warning(s)
</code></pre>
<p>Ich raff die Fehler nicht habe { eingefügt aber das hat auch nicht geholfen.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/317946/schulaufgabe-kleine-fehler</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Jul 2026 21:39:40 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/317946.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 25 Jun 2013 17:19:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Schulaufgabe: Kleine Fehler. on Tue, 25 Jun 2013 17:19:10 GMT]]></title><description><![CDATA[<p>Ich bins wieder <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>
<p>Wie der Titel schon sagt, hab ich diesmal ein anderes Problem mit einer Schulaufgabe.</p>
<p>Hier die Aufgabe als Bild. <a href="http://s14.directupload.net/file/d/3297/harrufdt_png.htm" rel="nofollow">http://s14.directupload.net/file/d/3297/harrufdt_png.htm</a></p>
<p>Also eigentlich ist die nicht schwer die haben wir auch im Unterricht gemacht gehabt, verstehen tu ich sie. Aber dennoch gibt es 1-2 kleine Fehler die ich einfach nicht beseitigen kann, wahrscheinlich fehlt es mir ganz einfach an Erfahrung.</p>
<p>Hier ist es wie ich es mir so denke:</p>
<pre><code>#include &quot;stdafx.h 
enum sex
{
	male,
	female
};

struct Date
{
	unsigned short day, month, year;
};

struct AddressItem
{
	char prename[40], familyname[40];
		Date Born;
		sex s;
	char livingPlace[100];
};
void FillAddress(AddressItem &amp;A, char _prename[], char _familyname[],
	unsigned short _day, unsigned short _month,
	unsigned short _year, sex _s, char _livingPlace[]);
{
	strcpy_s (A.prename, _prename);
	strcpy_s (A.familyname, _familyname);
	A.Born.day = _day;
	A.Born.month = _month;
	A.Born.year = _year;
	A.s = _s
	strcpy_s (A.livingPlace, _livingPlace);
}

void Display (AddressItem &amp;A)
{
	switch (A.s)
	{
	case male:
		printf(&quot;Herr&quot;);
		break;

	case female:
		printf(&quot;Frau&quot;);
		break;
	}

	printf(&quot;Vorname, Nachname %s, %s \n&quot;, A.prename, A.familyname);
	printf(&quot;Geburtsdatum: %u .%u .%u \n&quot;, A.Born.day, A.Born.month, A.Born.year);
	printf(&quot;Wohnort: %s \n&quot;, A.livingPlace);
}

void main()

{
	AddressItem person1;
	FillAddress(person1,&quot;Peter&quot;,&quot;Mueller&quot;,1,4,1968,male,&quot;Blumenstr. 53&quot;);
	Display(person1);
}
</code></pre>
<p>ps: das mit dem Namen hab ich geändert weil ich keine Lust hatte so viel rein zu tippen. (Peter Müller)</p>
<p>Fehlercode:</p>
<pre><code>1&gt;------ Build started: Project: Aufgabe_2, Configuration: Debug Win32 ------
1&gt;Compiling...
1&gt;Aufgabe_2.cpp
1&gt;c:\users\xx\documents\visual studio 2005\projects\aufgabe_2\aufgabe_2.cpp(1) : error C2001: newline in constant
1&gt;c:\users\xx\documents\visual studio 2005\projects\aufgabe_2\aufgabe_2.cpp(23) : error C2447: '{' : missing function header (old-style formal list?)
1&gt;Build log was saved at &quot;file://c:\Users\xx\Documents\Visual Studio 2005\Projects\Aufgabe_2\Debug\BuildLog.htm&quot;
1&gt;Aufgabe_2 - 2 error(s), 0 warning(s)
</code></pre>
<p>Ich raff die Fehler nicht habe { eingefügt aber das hat auch nicht geholfen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2334320</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2334320</guid><dc:creator><![CDATA[Kid Pharell]]></dc:creator><pubDate>Tue, 25 Jun 2013 17:19:10 GMT</pubDate></item><item><title><![CDATA[Reply to Schulaufgabe: Kleine Fehler. on Tue, 25 Jun 2013 17:22:33 GMT]]></title><description><![CDATA[<p>dir fehlt ein &quot; in deinem include.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2334322</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2334322</guid><dc:creator><![CDATA[vario-500]]></dc:creator><pubDate>Tue, 25 Jun 2013 17:22:33 GMT</pubDate></item><item><title><![CDATA[Reply to Schulaufgabe: Kleine Fehler. on Tue, 25 Jun 2013 18:17:32 GMT]]></title><description><![CDATA[<p>Kid Pharell schrieb:</p>
<blockquote>
<p>Ich raff die Fehler nicht habe { eingefügt aber das hat auch nicht geholfen.</p>
</blockquote>
<p>Du musst die Fehler von oben nach unten abarbeiten. Wenn der erste Fehler aufgetreten ist sind die nachfolgenden oft falscher Alarm!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2334335</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2334335</guid><dc:creator><![CDATA[manni66]]></dc:creator><pubDate>Tue, 25 Jun 2013 18:17:32 GMT</pubDate></item><item><title><![CDATA[Reply to Schulaufgabe: Kleine Fehler. on Tue, 25 Jun 2013 19:05:04 GMT]]></title><description><![CDATA[<blockquote>
<p>1&gt;c:\users\xx\documents\visual studio 2005\projects\aufgabe_2\aufgabe_2.cpp(1) : error C2001: newline in constant</p>
</blockquote>
<p>In Zeile 1 fehlt <strong>&quot;</strong> am Ende, um den String richtig zu umschließen.</p>
<blockquote>
<p>1&gt;c:\users\xx\documents\visual studio 2005\projects\aufgabe_2\aufgabe_2.cpp(23) : error C2447: '{' : missing function header (old-style formal list?)</p>
</blockquote>
<p>In Zeile 22 wird der Funktionskopf mit <strong>;</strong> beendet, wie es bei einem Prototypen geschrieben wird, allerdings soll danach der Funktionskörper folgen, also muss <strong>;</strong> weg.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2334347</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2334347</guid><dc:creator><![CDATA[Youka]]></dc:creator><pubDate>Tue, 25 Jun 2013 19:05:04 GMT</pubDate></item><item><title><![CDATA[Reply to Schulaufgabe: Kleine Fehler. on Wed, 26 Jun 2013 15:30:23 GMT]]></title><description><![CDATA[<p>Ich sehe da kein C++ <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2334561</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2334561</guid><dc:creator><![CDATA[MichelRT]]></dc:creator><pubDate>Wed, 26 Jun 2013 15:30:23 GMT</pubDate></item><item><title><![CDATA[Reply to Schulaufgabe: Kleine Fehler. on Wed, 26 Jun 2013 16:32:26 GMT]]></title><description><![CDATA[<p>Ich schon, sonst muesste man bei Variablen eines benutzerdefinierten Typs ein <code>struct</code> voranstellen.</p>
<p>Btw. woher kommt die Unsitte ein _ den Variablennamen voranzustellen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2334583</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2334583</guid><dc:creator><![CDATA[knivil]]></dc:creator><pubDate>Wed, 26 Jun 2013 16:32:26 GMT</pubDate></item></channel></rss>