<?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 einlesen und speichern]]></title><description><![CDATA[<p>Hallo!</p>
<p>Ich habe ein Problrm, unswar, ich möchte ein Programm schreiben,<br />
das daten einliest, auf der festplatte speichert und dann wenn man den Pfad<br />
angibt, wieder ausgibt.</p>
<p>Als beispie wi ich einfach mal einen Stundenplan (im DOS-fenster) ausgeben.<br />
also etwa so:</p>
<p>Freitag:<br />
1: Mathe<br />
----------<br />
2: Englisch<br />
----------<br />
3: Bio<br />
----------<br />
4: Physik</p>
<p>oder so...<br />
meine frage ist nun:<br />
wie kann ich diese daten speichern?!?(.txt) <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /><br />
(sie sollen alle in einen Ordner auf der Festplatte gepackt werden..)</p>
<p>danke für jede hilfe<br />
martinustreveri</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/224878/daten-einlesen-und-speichern</link><generator>RSS for Node</generator><lastBuildDate>Fri, 02 Oct 2026 03:29:32 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/224878.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 16 Oct 2008 09:15:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Daten einlesen und speichern on Thu, 16 Oct 2008 09:15:08 GMT]]></title><description><![CDATA[<p>Hallo!</p>
<p>Ich habe ein Problrm, unswar, ich möchte ein Programm schreiben,<br />
das daten einliest, auf der festplatte speichert und dann wenn man den Pfad<br />
angibt, wieder ausgibt.</p>
<p>Als beispie wi ich einfach mal einen Stundenplan (im DOS-fenster) ausgeben.<br />
also etwa so:</p>
<p>Freitag:<br />
1: Mathe<br />
----------<br />
2: Englisch<br />
----------<br />
3: Bio<br />
----------<br />
4: Physik</p>
<p>oder so...<br />
meine frage ist nun:<br />
wie kann ich diese daten speichern?!?(.txt) <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /><br />
(sie sollen alle in einen Ordner auf der Festplatte gepackt werden..)</p>
<p>danke für jede hilfe<br />
martinustreveri</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1599801</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1599801</guid><dc:creator><![CDATA[martinustreveri]]></dc:creator><pubDate>Thu, 16 Oct 2008 09:15:08 GMT</pubDate></item><item><title><![CDATA[Reply to Daten einlesen und speichern on Thu, 16 Oct 2008 09:29:12 GMT]]></title><description><![CDATA[<p>simpelstes Beispiel:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;fstream&gt;

int main()
{
    // speichern
    std::ofstream ofilestr( &quot;test.txt&quot; );

    ofilestr &lt;&lt; &quot;Zeile 1\n&quot;;
    ofilestr &lt;&lt; &quot;Zeile 2\n&quot;;
    ofilestr &lt;&lt; &quot;Zeile 3\n&quot;;

    ofilestr.close();

    //lesen
    std::ifstream ifilestr( &quot;test.txt&quot;, std::ifstream::in );
    while ( ifilestr.good() )
    {
        std::cout &lt;&lt; static_cast&lt;char&gt;( ifilestr.get() );
    }

    ifilestr.close();
}
</code></pre>
<p>fuer alles weitere:<br />
<a href="http://www.cplusplus.com/ifstream" rel="nofollow">www.cplusplus.com/ifstream</a><br />
<a href="http://www.cplusplus.com/ofstream" rel="nofollow">www.cplusplus.com/ofstream</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1599812</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1599812</guid><dc:creator><![CDATA[zwutz]]></dc:creator><pubDate>Thu, 16 Oct 2008 09:29:12 GMT</pubDate></item><item><title><![CDATA[Reply to Daten einlesen und speichern on Thu, 16 Oct 2008 09:53:42 GMT]]></title><description><![CDATA[<p>ok,danke , werde es mir mal ansehenaber da wäre noch: wie kann ich den speicherort ändern? weil &quot;C:\xyz\test.txt&quot; (der ordner ist vorhanden)geht nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1599814</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1599814</guid><dc:creator><![CDATA[martinustreveri]]></dc:creator><pubDate>Thu, 16 Oct 2008 09:53:42 GMT</pubDate></item><item><title><![CDATA[Reply to Daten einlesen und speichern on Thu, 16 Oct 2008 11:11:51 GMT]]></title><description><![CDATA[<p>Hast du daran gedacht, jeden Backslash vorher zu escapen?</p>
<p>&quot;C:\\xyz\\test.txt&quot;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1599866</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1599866</guid><dc:creator><![CDATA[mad_martin]]></dc:creator><pubDate>Thu, 16 Oct 2008 11:11:51 GMT</pubDate></item><item><title><![CDATA[Reply to Daten einlesen und speichern on Thu, 16 Oct 2008 18:10:31 GMT]]></title><description><![CDATA[<p>mad_martin schrieb:</p>
<blockquote>
<p>Hast du daran gedacht, jeden Backslash vorher zu escapen?</p>
<p>&quot;C:\\xyz\\test.txt&quot;</p>
</blockquote>
<p>Besser gleich Slashes verwenden:</p>
<pre><code class="language-cpp">&quot;C:/xyz/test.txt&quot;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1600091</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1600091</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Thu, 16 Oct 2008 18:10:31 GMT</pubDate></item></channel></rss>