<?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[Grundlagen]]></title><description><![CDATA[<p>Ich schreibe in drei tagen eine Klausur!!!<br />
Hab in allen Büchern und Skripten, die mir zur Verfügung stehen nachgeschlagen, konnte dennoch nichts zu diesen beiden Fragen finden.</p>
<p>1. Erläutern Sie den Unterschied zwischen einem C-Array und einer Struktur<br />
(struct)bzgl. der möglichen Datentypen und des Datenzugriffs.</p>
<p>2. Geben Sie in Stichworten dei Schritte an, die ein Programm ausführen muss, um eine Zahlenfolge nach dem &quot;Selection - Sort - Algorithmus&quot; aufsteigend zu sortieren. Nehmen Sie zum Beispiel die Folge:</p>
<p>7 3 5 12 2 1</p>
<p>Kann mir jemand weiterhelfen????<br />
Im Voraus vielen Dank.<br />
greetz<br />
ttl</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/170465/grundlagen</link><generator>RSS for Node</generator><lastBuildDate>Thu, 17 Sep 2026 02:45:06 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/170465.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 16 Jan 2007 12:03:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Grundlagen on Tue, 16 Jan 2007 12:03:02 GMT]]></title><description><![CDATA[<p>Ich schreibe in drei tagen eine Klausur!!!<br />
Hab in allen Büchern und Skripten, die mir zur Verfügung stehen nachgeschlagen, konnte dennoch nichts zu diesen beiden Fragen finden.</p>
<p>1. Erläutern Sie den Unterschied zwischen einem C-Array und einer Struktur<br />
(struct)bzgl. der möglichen Datentypen und des Datenzugriffs.</p>
<p>2. Geben Sie in Stichworten dei Schritte an, die ein Programm ausführen muss, um eine Zahlenfolge nach dem &quot;Selection - Sort - Algorithmus&quot; aufsteigend zu sortieren. Nehmen Sie zum Beispiel die Folge:</p>
<p>7 3 5 12 2 1</p>
<p>Kann mir jemand weiterhelfen????<br />
Im Voraus vielen Dank.<br />
greetz<br />
ttl</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1210684</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1210684</guid><dc:creator><![CDATA[ttl]]></dc:creator><pubDate>Tue, 16 Jan 2007 12:03:02 GMT</pubDate></item><item><title><![CDATA[Reply to Grundlagen on Tue, 16 Jan 2007 12:09:31 GMT]]></title><description><![CDATA[<p>1. Was ein Array und eine Struct sind, dürftet ihr hoffentlich gelernt haben. Wenn dazu nichts in deinen Aufzeichnungen steht, hast du wohl im Unterricht geschlafen.</p>
<p>2. Schau mal im Wikipedia nach, dort findest du oft recht ausführliche Erklärungen.<br />
(in Kurzform: für i=1 (bzw. 0) bis n: suche das i't-kleinste Element des gegebenen Arrays und trage es an Position i ein)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1210690</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1210690</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Tue, 16 Jan 2007 12:09:31 GMT</pubDate></item><item><title><![CDATA[Reply to Grundlagen on Tue, 16 Jan 2007 12:22:43 GMT]]></title><description><![CDATA[<p>Das mit den Datentypen und mit dem Datenzugriff find ich einfach nicht....<br />
Was ein Array und ein struct ist weiß ich wohl nur wie deren Datentyp und der Datenzugriff ist weiß ich nciht....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1210709</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1210709</guid><dc:creator><![CDATA[ttl]]></dc:creator><pubDate>Tue, 16 Jan 2007 12:22:43 GMT</pubDate></item><item><title><![CDATA[Reply to Grundlagen on Tue, 16 Jan 2007 12:25:17 GMT]]></title><description><![CDATA[<p>Nagut, dann mal die Zusammenfassung (hab gerade gute Laune):</p>
<p>Array:<br />
- gleichartige Elemente<br />
- Zugriff über den Index ( <code>name[i]</code> )</p>
<p>Struct<br />
- beliebige Elementtypen kombiniert<br />
- Zugriff über Elementnamen ( <code>name.element</code> )</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1210712</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1210712</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Tue, 16 Jan 2007 12:25:17 GMT</pubDate></item><item><title><![CDATA[Reply to Grundlagen on Tue, 16 Jan 2007 12:28:01 GMT]]></title><description><![CDATA[<p>DANKE, DANKE, DANKE.<br />
Hat mir gut geholfen.<br />
BYE</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1210714</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1210714</guid><dc:creator><![CDATA[ttl]]></dc:creator><pubDate>Tue, 16 Jan 2007 12:28:01 GMT</pubDate></item><item><title><![CDATA[Reply to Grundlagen on Tue, 16 Jan 2007 13:09:41 GMT]]></title><description><![CDATA[<p>ich bin neu Einsteiger</p>
<p>kann mir einer kurz sagen was in dise Beispiel ausgeliefert wird ?<br />
und was bededeutet genau xy.a und xy.b ?</p>
<p>-----------------<br />
struct abc<br />
{int a; double b;};<br />
abc fu (float x, float y)<br />
{ abc xy;<br />
xy.a =int (x);<br />
xy.b =double(x*y);<br />
return xy;<br />
}</p>
<p>bvoid main ()<br />
{<br />
float a= 4.9, b= 5.0;<br />
cout {{ fu (a,b).a {{ endl {{ fu (a,b).b;}</p>
<p>-----------------------------------------<br />
danke schon im Voraus <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/1210742</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1210742</guid><dc:creator><![CDATA[dorlion]]></dc:creator><pubDate>Tue, 16 Jan 2007 13:09:41 GMT</pubDate></item><item><title><![CDATA[Reply to Grundlagen on Tue, 16 Jan 2007 13:12:26 GMT]]></title><description><![CDATA[<p>Wo hast du denn das abgeschrieben? Das sieht aus wie verhunzter C++-Code.</p>
<p>(für die Erkläruing, was das machen könnte, empfehle ich dir deine Leerbücher - 'xy.a' ist der Elementzugriff bei Structs)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1210745</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1210745</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Tue, 16 Jan 2007 13:12:26 GMT</pubDate></item><item><title><![CDATA[Reply to Grundlagen on Tue, 16 Jan 2007 14:39:27 GMT]]></title><description><![CDATA[<p>CStoll schrieb:</p>
<blockquote>
<p>empfehle ich dir deine Leerbücher ...</p>
</blockquote>
<p>Na, ob das DA drinstehen wird ? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>Gruß,</p>
<p>Simon2.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1210816</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1210816</guid><dc:creator><![CDATA[Simon2]]></dc:creator><pubDate>Tue, 16 Jan 2007 14:39:27 GMT</pubDate></item><item><title><![CDATA[Reply to Grundlagen on Tue, 16 Jan 2007 14:52:33 GMT]]></title><description><![CDATA[<p>dorlion schrieb:</p>
<blockquote>
<pre><code class="language-cpp">// struktur welches ein int und ein double beinhaltet
struct abc{
    int a;
    double b;
};
// funktions prototyp welches eine gefuellte struktur returniert
abc fu(float x, float y){
    abc xy;  // instanz der struktur
    xy.a =(int)x; //das x als int direkt zuweisen
    xy.b =(double)(x*y); // x*y und das an den double zuweisen
    return xy; // die instanz zurueck geben
}

void main(){ 
    float a = 4.9;
    float b= 5.0;
    cout &lt;&lt; fu(a,b).a &lt;&lt; endl &lt;&lt; fu(a,b).b; // aufruf von fu und ausgabe von a, das selbe mit b
}
</code></pre>
</blockquote>
<p>hier mal in farbe wegen der uebersicht</p>
<p>1. du hast xy.a = int(x) gemacht, das ist ein cast und das sollte so xy.a = (int)x<br />
2. das selbe mit dem double<br />
3. du hast statt &lt;&lt; {{ gemacht, scheinst es nicht zu compiliert haben<br />
4. ein &quot;bvoid main()&quot; kenn cih nicht {o;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1210825</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1210825</guid><dc:creator><![CDATA[EXDW]]></dc:creator><pubDate>Tue, 16 Jan 2007 14:52:33 GMT</pubDate></item><item><title><![CDATA[Reply to Grundlagen on Wed, 17 Jan 2007 07:43:17 GMT]]></title><description><![CDATA[<p>Mr Evil schrieb:</p>
<blockquote>
<p>1. du hast xy.a = int(x) gemacht, das ist ein cast und das sollte so xy.a = (int)x</p>
</blockquote>
<p>Nein, das <code>xy.a=int(x);</code> ist genauso gültig (das nennt sich &quot;function style cast&quot;).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1211123</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1211123</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Wed, 17 Jan 2007 07:43:17 GMT</pubDate></item><item><title><![CDATA[Reply to Grundlagen on Wed, 17 Jan 2007 09:08:59 GMT]]></title><description><![CDATA[<p>achso - ok #gg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1211184</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1211184</guid><dc:creator><![CDATA[EXDW]]></dc:creator><pubDate>Wed, 17 Jan 2007 09:08:59 GMT</pubDate></item></channel></rss>