<?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[Speichern von Daten]]></title><description><![CDATA[<p>Tach!<br />
Folgendes Problem, ich möchte Daten, die ich in einer Variablen Namens &quot;Data&quot; vom Typ AnsiString habe in eine Datei speichern. Dazu habe ich folgenden Code geschrieben:</p>
<pre><code>FILE * pFile;
  char buffer[];
  buffer = Data;                 // Data ist vom Typ AnsiString
  pFile = fopen (&quot;Data.txt&quot; , &quot;a&quot;); //öffne Datei und hänge Werte hinten dran
  fwrite (buffer , 1 , Data.Length() , pFile);
  fclose (pFile);
</code></pre>
<p>Leider kann ich den AnsiString Data nicht in das Char Array schreiben! ...<br />
Danke!!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/132295/speichern-von-daten</link><generator>RSS for Node</generator><lastBuildDate>Fri, 31 Jul 2026 01:50:28 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/132295.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 09 Jan 2006 17:28:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Speichern von Daten on Mon, 09 Jan 2006 17:28:22 GMT]]></title><description><![CDATA[<p>Tach!<br />
Folgendes Problem, ich möchte Daten, die ich in einer Variablen Namens &quot;Data&quot; vom Typ AnsiString habe in eine Datei speichern. Dazu habe ich folgenden Code geschrieben:</p>
<pre><code>FILE * pFile;
  char buffer[];
  buffer = Data;                 // Data ist vom Typ AnsiString
  pFile = fopen (&quot;Data.txt&quot; , &quot;a&quot;); //öffne Datei und hänge Werte hinten dran
  fwrite (buffer , 1 , Data.Length() , pFile);
  fclose (pFile);
</code></pre>
<p>Leider kann ich den AnsiString Data nicht in das Char Array schreiben! ...<br />
Danke!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/962009</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/962009</guid><dc:creator><![CDATA[RobTob]]></dc:creator><pubDate>Mon, 09 Jan 2006 17:28:22 GMT</pubDate></item><item><title><![CDATA[Reply to Speichern von Daten on Mon, 09 Jan 2006 17:42:01 GMT]]></title><description><![CDATA[<p>Siehe Platz 2 der Top 3 in der <a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39305.html" rel="nofollow">FAQ</a>.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/962014</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/962014</guid><dc:creator><![CDATA[Dasd]]></dc:creator><pubDate>Mon, 09 Jan 2006 17:42:01 GMT</pubDate></item><item><title><![CDATA[Reply to Speichern von Daten on Mon, 09 Jan 2006 18:04:50 GMT]]></title><description><![CDATA[<p>du kannst AnsiString in char* mit mit der Methode <em>AnsiString::c_str()</em> umwandeln</p>
<p>mfg<br />
BigNeal</p>
]]></description><link>https://www.c-plusplus.net/forum/post/962028</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/962028</guid><dc:creator><![CDATA[BigNeal]]></dc:creator><pubDate>Mon, 09 Jan 2006 18:04:50 GMT</pubDate></item><item><title><![CDATA[Reply to Speichern von Daten on Mon, 09 Jan 2006 18:31:26 GMT]]></title><description><![CDATA[<p>Lieber BigNeal. Dasd hat doch bereits erheblich umfassender als du geantwortet? (o;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/962053</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/962053</guid><dc:creator><![CDATA[junix]]></dc:creator><pubDate>Mon, 09 Jan 2006 18:31:26 GMT</pubDate></item><item><title><![CDATA[Reply to Speichern von Daten on Mon, 09 Jan 2006 18:31:30 GMT]]></title><description><![CDATA[<p>Danke, also die FAQ habe ich gelesen...nur laufen tuts immer noch nicht!</p>
<pre><code>FILE * pFile;
  char buffer[Data.Length()] = Data.c_str();               
  pFile = fopen (&quot;Data.txt&quot; , &quot;a&quot;); //öffne Datei und hänge Werte hinten dran
  fwrite (buffer , 1 , Data.Length() , pFile);
  fclose (pFile);
</code></pre>
<p>Fehlermeldungen:<br />
* Konstantenausdruck erforderlich<br />
* char nach char[1] nicht möglich</p>
<p>Danke für Hilfe!</p>
<p>P.S. Sorry für den Doppeleintrag!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/962054</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/962054</guid><dc:creator><![CDATA[RobTob]]></dc:creator><pubDate>Mon, 09 Jan 2006 18:31:30 GMT</pubDate></item><item><title><![CDATA[Reply to Speichern von Daten on Mon, 09 Jan 2006 19:02:47 GMT]]></title><description><![CDATA[<p>junix schrieb:</p>
<blockquote>
<p>Lieber BigNeal. Dasd hat doch bereits erheblich umfassender als du geantwortet? (o;</p>
</blockquote>
<p>ups sorry.. *schäm*.. habe es mit platz 3 verwechselt.. dachte er verweisst darauf..</p>
<p>nächstes mal schaue ich zuerst nach, bevor ich denke <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>mfg<br />
BigNeal</p>
]]></description><link>https://www.c-plusplus.net/forum/post/962097</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/962097</guid><dc:creator><![CDATA[BigNeal]]></dc:creator><pubDate>Mon, 09 Jan 2006 19:02:47 GMT</pubDate></item><item><title><![CDATA[Reply to Speichern von Daten on Mon, 09 Jan 2006 19:08:27 GMT]]></title><description><![CDATA[<p>char *buffer = Data.c_str();</p>
]]></description><link>https://www.c-plusplus.net/forum/post/962109</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/962109</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Mon, 09 Jan 2006 19:08:27 GMT</pubDate></item><item><title><![CDATA[Reply to Speichern von Daten on Mon, 09 Jan 2006 19:40:34 GMT]]></title><description><![CDATA[<pre><code>FILE * pFile;
pFile = fopen (&quot;Data.txt&quot; , &quot;a&quot;); //öffne Datei und hänge Werte hinten dran
fwrite (Data.c_str() , 1 , Data.Length() , pFile);
fclose (pFile);
</code></pre>
<p>müsste hinhauen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/962147</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/962147</guid><dc:creator><![CDATA[AlgorithMan]]></dc:creator><pubDate>Mon, 09 Jan 2006 19:40:34 GMT</pubDate></item><item><title><![CDATA[Reply to Speichern von Daten on Tue, 10 Jan 2006 09:41:35 GMT]]></title><description><![CDATA[<p>Etwas mehr C++</p>
<pre><code class="language-cpp">ofstream out(&quot;Data.txt&quot;,ios::app);
out &lt;&lt; Data.c_str();
out.close(); //eigentlich unnötige da der Destruktor von ofstream sowieso schliesst
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/962454</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/962454</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Tue, 10 Jan 2006 09:41:35 GMT</pubDate></item></channel></rss>