<?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[&amp;quot;struct&amp;quot; Element löschen]]></title><description><![CDATA[<p>Hey,</p>
<p>erneut eine Frage:</p>
<p>Ich habe ein struct:</p>
<pre><code class="language-cpp">struct artikel
	{

		int    artNum;
		char   artName[25];
		char   artSize[3];
		double artPrice;

	};
</code></pre>
<p>Und folgende Artikel eingebaut:</p>
<pre><code class="language-cpp">artikel jacke;
	jacke.artNum = 1;
	strcpy_s(jacke.artName, &quot;Jacke&quot;);
	strcpy_s(jacke.artSize, &quot;XL&quot;);
	jacke.artPrice = 17.99;

	artikel schuhe;
	schuhe.artNum = 2;
	strcpy_s(schuhe.artName, &quot;Schuhe&quot;);
	strcpy_s(schuhe.artSize, &quot;M&quot;);
	schuhe.artPrice = 25.99;

	artikel hose;
	hose.artNum = 3;
	strcpy_s(hose.artName, &quot;Hose&quot;);
	strcpy_s(hose.artSize, &quot;M&quot;);
	hose.artPrice = 21.99;

	artikel pullover;
	pullover.artNum = 4;
	strcpy_s(pullover.artName, &quot;Rollkragenpullover&quot;);
	strcpy_s(pullover.artSize, &quot;L&quot;);
	pullover.artPrice = 15.99;
</code></pre>
<p>Meine Frage:</p>
<p>Wie kann ich jetzt beispielsweise <strong>artikel hose;</strong> komplett löschen?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/273677/quot-struct-quot-element-löschen</link><generator>RSS for Node</generator><lastBuildDate>Thu, 27 Aug 2026 23:40:56 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/273677.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 10 Sep 2010 20:22:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to &amp;quot;struct&amp;quot; Element löschen on Fri, 10 Sep 2010 20:22:07 GMT]]></title><description><![CDATA[<p>Hey,</p>
<p>erneut eine Frage:</p>
<p>Ich habe ein struct:</p>
<pre><code class="language-cpp">struct artikel
	{

		int    artNum;
		char   artName[25];
		char   artSize[3];
		double artPrice;

	};
</code></pre>
<p>Und folgende Artikel eingebaut:</p>
<pre><code class="language-cpp">artikel jacke;
	jacke.artNum = 1;
	strcpy_s(jacke.artName, &quot;Jacke&quot;);
	strcpy_s(jacke.artSize, &quot;XL&quot;);
	jacke.artPrice = 17.99;

	artikel schuhe;
	schuhe.artNum = 2;
	strcpy_s(schuhe.artName, &quot;Schuhe&quot;);
	strcpy_s(schuhe.artSize, &quot;M&quot;);
	schuhe.artPrice = 25.99;

	artikel hose;
	hose.artNum = 3;
	strcpy_s(hose.artName, &quot;Hose&quot;);
	strcpy_s(hose.artSize, &quot;M&quot;);
	hose.artPrice = 21.99;

	artikel pullover;
	pullover.artNum = 4;
	strcpy_s(pullover.artName, &quot;Rollkragenpullover&quot;);
	strcpy_s(pullover.artSize, &quot;L&quot;);
	pullover.artPrice = 15.99;
</code></pre>
<p>Meine Frage:</p>
<p>Wie kann ich jetzt beispielsweise <strong>artikel hose;</strong> komplett löschen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1951115</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1951115</guid><dc:creator><![CDATA[basi]]></dc:creator><pubDate>Fri, 10 Sep 2010 20:22:07 GMT</pubDate></item><item><title><![CDATA[Reply to &amp;quot;struct&amp;quot; Element löschen on Fri, 10 Sep 2010 20:45:03 GMT]]></title><description><![CDATA[<p>Indem du den aktuellen Scope verlässt.</p>
<p>Irgendwie habe ich nicht das Gefühl, dass du diese Antwort suchst (obwohl technisch korrekt), leider verrätst du nicht was das ganze werden soll.</p>
<p>Ich kann dir aber schon einmal auf andere Weise helfen: Hör sofort mit dem C Kurs auf den du gerade machst. Er taugt nichts und wird dir mehr schaden als nützen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1951122</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1951122</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Fri, 10 Sep 2010 20:45:03 GMT</pubDate></item><item><title><![CDATA[Reply to &amp;quot;struct&amp;quot; Element löschen on Fri, 10 Sep 2010 22:41:45 GMT]]></title><description><![CDATA[<p>Wir hatten dir schon in deinem anderen Thread ans Herz gelegt, erst einmal de Grundlagen zu lernen sprich ein anständiges C++ Grundlagenbuch zu lesen.<br />
Falls du gerade eins deiner Bucher ließt sind diese für C++ Schrott <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>Lg freeG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1951137</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1951137</guid><dc:creator><![CDATA[fr33g]]></dc:creator><pubDate>Fri, 10 Sep 2010 22:41:45 GMT</pubDate></item><item><title><![CDATA[Reply to &amp;quot;struct&amp;quot; Element löschen on Sat, 11 Sep 2010 10:44:14 GMT]]></title><description><![CDATA[<p>fr33g schrieb:</p>
<blockquote>
<p>Falls du gerade eins deiner Bucher ließt sind diese für C++ Schrott <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>
</blockquote>
<p>Und wieso genau? Bzw. kannst du eines empfehlen?</p>
<p>PS.: Ich mache keinen C Kurs O.o</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1951229</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1951229</guid><dc:creator><![CDATA[basi]]></dc:creator><pubDate>Sat, 11 Sep 2010 10:44:14 GMT</pubDate></item><item><title><![CDATA[Reply to &amp;quot;struct&amp;quot; Element löschen on Sat, 11 Sep 2010 10:58:39 GMT]]></title><description><![CDATA[<p>basi schrieb:</p>
<blockquote>
<p>Und wieso genau?</p>
</blockquote>
<p>Weil dein Code darauf hindeutet, dass du kein C++ gelernt hast, sondern C, eine komplett andere Sprache. Ein C++-Buch, dass einem C beibringt taugt daher logischerweise nichts.</p>
<blockquote>
<p>Bzw. kannst du eines empfehlen?</p>
</blockquote>
<p>Eigentlich haben die Bücher die du im anderen Thread genannt hast einen ganz guten Ruf. Anscheinend steckt da wohl doch nicht viel hinter.</p>
<blockquote>
<p>PS.: Ich mache keinen C Kurs O.o</p>
</blockquote>
<p>Ich meinte damit allgemein Kurs, Buch, Tutorial. Wo immer du den obigen Programmierstil her hast.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1951234</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1951234</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Sat, 11 Sep 2010 10:58:39 GMT</pubDate></item><item><title><![CDATA[Reply to &amp;quot;struct&amp;quot; Element löschen on Sat, 11 Sep 2010 11:11:42 GMT]]></title><description><![CDATA[<p>Naja ich mache das halt seit gestern Nachmittag, da kann da noch kein perfekter Programmierstil auf C++ optimiert dahinter stecken, zumal ich vorher viel mit PHP gemacht habe, da habe ich mir halt sowas angewöhnt.</p>
<p>Weiß ich also nicht genau was du mit &quot;Programmierstil&quot; genau meinst.</p>
<p>Im Buch steht übrigens vorne drin das das auch für C Programmierer geeignet ist die auf C++ umsteigen wollen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1951240</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1951240</guid><dc:creator><![CDATA[basi]]></dc:creator><pubDate>Sat, 11 Sep 2010 11:11:42 GMT</pubDate></item><item><title><![CDATA[Reply to &amp;quot;struct&amp;quot; Element löschen on Sat, 11 Sep 2010 11:38:23 GMT]]></title><description><![CDATA[<p>Es geht nicht um den perfekten Programmierstil für C++ sondern um so grundlegende Sachen dass man in C++ std::string nimmt anstatt char Arrays, dass man mit Klassen und Abstraktion bzw generell OOP programmiert.<br />
Und dein Codebeispiel zeigt genau das Gegenteil:</p>
<p>Es werden structs verwendet wo alle Member public sind und es wird direkt drauf zu gegriffen...</p>
<p>Es werden char Arrays genutzt mit den dazu passenden Funktionen aus der <strong>C</strong>-Standard-Bibliothek.</p>
<p>Daraus schließe ich einfach mal, dass dein Buch so ein typische C/C++ Buch ist, was gar nicht gut ist um C++ zu lernen.</p>
<p>Lg freeG</p>
<p>PS: Empfehlen kann ich dir den C++ Primer oder Die C++ Programmiersprache.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1951251</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1951251</guid><dc:creator><![CDATA[fr33g]]></dc:creator><pubDate>Sat, 11 Sep 2010 11:38:23 GMT</pubDate></item><item><title><![CDATA[Reply to &amp;quot;struct&amp;quot; Element löschen on Sat, 11 Sep 2010 11:47:01 GMT]]></title><description><![CDATA[<p>Du meinst dieses hier?</p>
<p><a href="http://www.amazon.de/gp/product/382731660X/sr=8-2/qid=1284205296/ref=olp_product_details?ie=UTF8&amp;me=&amp;qid=1284205296&amp;sr=8-2&amp;seller=" rel="nofollow">http://www.amazon.de/gp/product/382731660X/sr=8-2/qid=1284205296/ref=olp_product_details?ie=UTF8&amp;me=&amp;qid=1284205296&amp;sr=8-2&amp;seller=</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1951254</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1951254</guid><dc:creator><![CDATA[basi]]></dc:creator><pubDate>Sat, 11 Sep 2010 11:47:01 GMT</pubDate></item><item><title><![CDATA[Reply to &amp;quot;struct&amp;quot; Element löschen on Mon, 13 Sep 2010 08:11:17 GMT]]></title><description><![CDATA[<p>fr33g schrieb:</p>
<blockquote>
<p>Es werden structs verwendet wo alle Member public sind und es wird direkt drauf zu gegriffen...</p>
<p>Es werden char Arrays genutzt mit den dazu passenden Funktionen aus der <strong>C</strong>-Standard-Bibliothek.</p>
<p>Daraus schließe ich einfach mal, dass dein Buch so ein typische C/C++ Buch ist, was gar nicht gut ist um C++ zu lernen.</p>
<p>Lg freeG</p>
</blockquote>
<p>Unter manchen Umständen ist es mMn in Ordnung, die OOP Paradigmen absichtlich zu verletzen. Wenn ich Datenobjekte habe, die eigentlich nur dazu da sind, um zusammenhängende Daten zu transportieren ist die Implementation als struct akzeptabel.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1951836</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1951836</guid><dc:creator><![CDATA[DocShoe]]></dc:creator><pubDate>Mon, 13 Sep 2010 08:11:17 GMT</pubDate></item><item><title><![CDATA[Reply to &amp;quot;struct&amp;quot; Element löschen on Mon, 13 Sep 2010 09:42:59 GMT]]></title><description><![CDATA[<p>DocShoe schrieb:</p>
<blockquote>
<p>fr33g schrieb:</p>
<blockquote>
<p>Es werden structs verwendet wo alle Member public sind und es wird direkt drauf zu gegriffen...</p>
<p>Es werden char Arrays genutzt mit den dazu passenden Funktionen aus der <strong>C</strong>-Standard-Bibliothek.</p>
<p>Daraus schließe ich einfach mal, dass dein Buch so ein typische C/C++ Buch ist, was gar nicht gut ist um C++ zu lernen.</p>
<p>Lg freeG</p>
</blockquote>
<p>Unter manchen Umständen ist es mMn in Ordnung, die OOP Paradigmen absichtlich zu verletzen. Wenn ich Datenobjekte habe, die eigentlich nur dazu da sind, um zusammenhängende Daten zu transportieren ist die Implementation als struct akzeptabel.</p>
</blockquote>
<p>Geb ich dir auch Recht, wenn ich mir zum Beispiel ne einfach Struct mache alls Zusammenfassung von Daten für die Rückgabe einer Funktion.</p>
<p>Aber ich bin von ausgegangen, dass er das so aus dem Buch übernommen hat mit den structs und so und wenn das Buch schon früh mit solchen Dingen anfängt, geh ich einfach mal von aus dass es dieses Design durchgehen benutzt und daher nicht für C++ geeignet ist, sondern so ein typisches C/C++ Buch ist.</p>
<p>Lg freeG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1951867</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1951867</guid><dc:creator><![CDATA[fr33g]]></dc:creator><pubDate>Mon, 13 Sep 2010 09:42:59 GMT</pubDate></item><item><title><![CDATA[Reply to &amp;quot;struct&amp;quot; Element löschen on Mon, 13 Sep 2010 18:01:50 GMT]]></title><description><![CDATA[<p>SeppJ schrieb:</p>
<blockquote>
<p>Weil dein Code darauf hindeutet, dass du kein C++ gelernt hast, sondern C, eine komplett andere Sprache.</p>
</blockquote>
<p>&quot;Ein C Programm ist ein C++ Programm, wenn auch kein gutes!&quot; <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1952122</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1952122</guid><dc:creator><![CDATA[NEO.PIXEL]]></dc:creator><pubDate>Mon, 13 Sep 2010 18:01:50 GMT</pubDate></item></channel></rss>