<?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[Daten mit ofstream speichern?]]></title><description><![CDATA[<p>hi all<br />
Ich bastle grad an einer simplen CD Verwaltung rum und mein Problem ist Folgendes.<br />
Ich habe eine Eingabe im Programm. Die Eingabe vom Benutzer soll in einer Datei gespeichert werden.<br />
Allerdings speichert er die sie nicht vollständig, wenn die Eingabe ein Leerzeichen hat.Wenn der Titel eines Liedes z.b &quot;Unbreak my heart&quot; ist, speichert er nur das Wort &quot;Unbreak&quot;. Was muss ich also ändern, damit er den ganzen Titel speichert?</p>
<p>Derzeitige Code:</p>
<pre><code>string test;
ofstream out (&quot;CD.txt&quot;, ios::app);   
         cin &gt;&gt; test;
         out &lt;&lt;test;
out.close();
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/139462/daten-mit-ofstream-speichern</link><generator>RSS for Node</generator><lastBuildDate>Sun, 30 Aug 2026 13:23:55 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/139462.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 06 Mar 2006 21:11:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Daten mit ofstream speichern? on Mon, 06 Mar 2006 21:11:53 GMT]]></title><description><![CDATA[<p>hi all<br />
Ich bastle grad an einer simplen CD Verwaltung rum und mein Problem ist Folgendes.<br />
Ich habe eine Eingabe im Programm. Die Eingabe vom Benutzer soll in einer Datei gespeichert werden.<br />
Allerdings speichert er die sie nicht vollständig, wenn die Eingabe ein Leerzeichen hat.Wenn der Titel eines Liedes z.b &quot;Unbreak my heart&quot; ist, speichert er nur das Wort &quot;Unbreak&quot;. Was muss ich also ändern, damit er den ganzen Titel speichert?</p>
<p>Derzeitige Code:</p>
<pre><code>string test;
ofstream out (&quot;CD.txt&quot;, ios::app);   
         cin &gt;&gt; test;
         out &lt;&lt;test;
out.close();
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1010131</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1010131</guid><dc:creator><![CDATA[letonin]]></dc:creator><pubDate>Mon, 06 Mar 2006 21:11:53 GMT</pubDate></item><item><title><![CDATA[Reply to Daten mit ofstream speichern? on Mon, 06 Mar 2006 21:29:01 GMT]]></title><description><![CDATA[<p>du liest schon falsch ein. mach #include &lt;string&gt; und benutz std::getline</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1010146</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1010146</guid><dc:creator><![CDATA[..........]]></dc:creator><pubDate>Mon, 06 Mar 2006 21:29:01 GMT</pubDate></item><item><title><![CDATA[Reply to Daten mit ofstream speichern? on Tue, 07 Mar 2006 13:30:58 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=1819" rel="nofollow">kingruedi</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=8" rel="nofollow">Rund um die Programmierung</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1010519</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1010519</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Tue, 07 Mar 2006 13:30:58 GMT</pubDate></item><item><title><![CDATA[Reply to Daten mit ofstream speichern? on Tue, 07 Mar 2006 17:41:19 GMT]]></title><description><![CDATA[<p>korrekt sollte es dann so sein:</p>
<pre><code class="language-cpp">#include &lt;string.h&gt;
...

string test;
ofstream out (&quot;CD.txt&quot;, ios::app);  
         getline(cin,test);
         out &lt;&lt;test;
out.close();

...
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1010756</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1010756</guid><dc:creator><![CDATA[ManuP]]></dc:creator><pubDate>Tue, 07 Mar 2006 17:41:19 GMT</pubDate></item></channel></rss>