<?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 speichern]]></title><description><![CDATA[<p>Hi,</p>
<p>Ich habe vor, mir einen Vokabeltrainer zu schreiben. Die vokabeln werden in einer .txt gespeichert.Nur irgendwie wird immer die ganze Liste überschrieben, wenn ich etwas neues hinzufügen möchte.</p>
<p>Hier der Quellcode:</p>
<pre><code>/---------------------------------------------------------------------------

#include &lt;vcl.h&gt;
#pragma hdrstop

#include &quot;Unit1.h&quot;
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource &quot;*.dfm&quot;
int Zahl;
TForm1 *Form1;
TStringList *deutsch;
TStringList *englisch;

void __fastcall TForm1::Panel5Click(TObject *Sender)
{
deutsch = new TStringList;
englisch = new TStringList;

if((deutschw-&gt;Text) != &quot;&quot; &amp;&amp; (engw-&gt;Text) != &quot;&quot;)
{
  deutsch-&gt;Add(deutschw-&gt;Text.c_str());
  deutsch-&gt;SaveToFile(&quot;deutsch.txt&quot;);

  englisch-&gt;Add(engw-&gt;Text.c_str());
  englisch-&gt;SaveToFile(&quot;englisch.txt&quot;);

  Application-&gt;MessageBoxA(&quot;Vokabel hinzugefügt&quot;,&quot;hinzugefügt&quot;,0+64);

 }
else
{
....
}
</code></pre>
<p>Weiß einer, wie ich es hinbekomme, dass ein neuer Wert zu der Liste hinzugefügt wird und nichts überschrieben wird?</p>
<p>Danke schonmal im vorraus <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_savoring_food"
      title=":yum:"
      alt="😋"
    /></p>
<p>schnurres</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/161863/problem-mit-speichern</link><generator>RSS for Node</generator><lastBuildDate>Tue, 11 Aug 2026 17:24:12 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/161863.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 11 Oct 2006 18:32:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit speichern on Wed, 11 Oct 2006 18:32:53 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>Ich habe vor, mir einen Vokabeltrainer zu schreiben. Die vokabeln werden in einer .txt gespeichert.Nur irgendwie wird immer die ganze Liste überschrieben, wenn ich etwas neues hinzufügen möchte.</p>
<p>Hier der Quellcode:</p>
<pre><code>/---------------------------------------------------------------------------

#include &lt;vcl.h&gt;
#pragma hdrstop

#include &quot;Unit1.h&quot;
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource &quot;*.dfm&quot;
int Zahl;
TForm1 *Form1;
TStringList *deutsch;
TStringList *englisch;

void __fastcall TForm1::Panel5Click(TObject *Sender)
{
deutsch = new TStringList;
englisch = new TStringList;

if((deutschw-&gt;Text) != &quot;&quot; &amp;&amp; (engw-&gt;Text) != &quot;&quot;)
{
  deutsch-&gt;Add(deutschw-&gt;Text.c_str());
  deutsch-&gt;SaveToFile(&quot;deutsch.txt&quot;);

  englisch-&gt;Add(engw-&gt;Text.c_str());
  englisch-&gt;SaveToFile(&quot;englisch.txt&quot;);

  Application-&gt;MessageBoxA(&quot;Vokabel hinzugefügt&quot;,&quot;hinzugefügt&quot;,0+64);

 }
else
{
....
}
</code></pre>
<p>Weiß einer, wie ich es hinbekomme, dass ein neuer Wert zu der Liste hinzugefügt wird und nichts überschrieben wird?</p>
<p>Danke schonmal im vorraus <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_savoring_food"
      title=":yum:"
      alt="😋"
    /></p>
<p>schnurres</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1153101</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1153101</guid><dc:creator><![CDATA[schnurres]]></dc:creator><pubDate>Wed, 11 Oct 2006 18:32:53 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit speichern on Wed, 11 Oct 2006 18:45:38 GMT]]></title><description><![CDATA[<p>Hallo.<br />
Du könntest zuerst mit LoadFromFile() deine Datei Laden und dann im Programm<br />
mit Append() deinen neuen Text anhängen und dann wieder speichern.<br />
Ansonsten andere Speicherfumktionen verwenden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1153110</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1153110</guid><dc:creator><![CDATA[Aksel]]></dc:creator><pubDate>Wed, 11 Oct 2006 18:45:38 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit speichern on Thu, 12 Oct 2006 09:14:33 GMT]]></title><description><![CDATA[<p>Schau Dir dazu auch mal diesen Thread an: <a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-76008-and-postdays-is-0-and-postorder-is-asc-and-highlight-is-%2Avokabel%2A-and-start-is-0.html" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-t-is-76008-and-postdays-is-0-and-postorder-is-asc-and-highlight-is-*vokabel*-and-start-is-0.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1153288</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1153288</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 12 Oct 2006 09:14:33 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit speichern on Thu, 12 Oct 2006 12:46:13 GMT]]></title><description><![CDATA[<p>Danke an alle!</p>
<p>ich habe es jetzt so gemacht :</p>
<pre><code>deutsch-&gt;LoadFromFile(&quot;deutsch.txt&quot;);
  deutsch-&gt;Add(deutschw-&gt;Text.c_str());
  deutsch-&gt;SaveToFile(&quot;deutsch.txt&quot;);

  englisch-&gt;LoadFromFile(&quot;englisch.txt&quot;);
  englisch-&gt;Add(engw-&gt;Text.c_str());
  englisch-&gt;SaveToFile(&quot;englisch.txt&quot;);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1153550</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1153550</guid><dc:creator><![CDATA[schnurres]]></dc:creator><pubDate>Thu, 12 Oct 2006 12:46:13 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit speichern on Thu, 12 Oct 2006 13:16:48 GMT]]></title><description><![CDATA[<p>warum machst du <em>.c_str()</em>?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1153592</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1153592</guid><dc:creator><![CDATA[Linnea]]></dc:creator><pubDate>Thu, 12 Oct 2006 13:16:48 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit speichern on Thu, 12 Oct 2006 13:57:29 GMT]]></title><description><![CDATA[<p>Ich würde auch nicht nach jedem neuen Wort die Datei neu abspeichern, geschweige denn, dann beim nächsten Wort die Datei erst wieder einladen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1153634</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1153634</guid><dc:creator><![CDATA[Th]]></dc:creator><pubDate>Thu, 12 Oct 2006 13:57:29 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit speichern on Thu, 12 Oct 2006 14:25:47 GMT]]></title><description><![CDATA[<p>gaaaaaaaaaaaaaaanz einfach</p>
<p>programm start</p>
<p>datei laden d<br />
datei laden e</p>
<p>do<br />
wort hinzufügen d<br />
wort hinzufügen e<br />
while</p>
<p>datei speichern d<br />
datei speichern a</p>
<p>programm ende</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1153672</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1153672</guid><dc:creator><![CDATA[^^  ^^]]></dc:creator><pubDate>Thu, 12 Oct 2006 14:25:47 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit speichern on Fri, 13 Oct 2006 15:34:10 GMT]]></title><description><![CDATA[<p>Th schrieb:</p>
<blockquote>
<p>Ich würde auch nicht nach jedem neuen Wort die Datei neu abspeichern, geschweige denn, dann beim nächsten Wort die Datei erst wieder einladen...</p>
</blockquote>
<p>Dann mach mal einen besseren Vorschlag ....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1154236</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1154236</guid><dc:creator><![CDATA[schnurres]]></dc:creator><pubDate>Fri, 13 Oct 2006 15:34:10 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit speichern on Fri, 13 Oct 2006 15:41:22 GMT]]></title><description><![CDATA[<p>Der Vorschlag steht doch (in Pseudocode) direkt über dir.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1154251</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1154251</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Fri, 13 Oct 2006 15:41:22 GMT</pubDate></item></channel></rss>