<?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 DAteibehandlung]]></title><description><![CDATA[<p>also mein Problem besteht darin das ich eine DAtei auslesen will und ihren inhalt auf dem Bildschirm ausgeben will ich habe shcon ein bisschen was probiert, jedoch geht das nicht.</p>
<pre><code class="language-cpp">#include&lt;cstdlib&gt;
#include&lt;fstream&gt;
#include&lt;iostream&gt;
#include&lt;string&gt;
int main()
{
    ifstream Quelle;
    strin Quellenname;
    cout&lt;&lt;&quot;Geben sie die Datei ein\n&quot;;
    getline(cin,Quellenname);

    Quelle.open(Quellenname.c_str(),ios::binary|ios::in);

    if(!Quelle) {
       cerr&lt;&lt; Quellennamen;
       &lt;&lt;&quot;Kann nicht geoeffnet werde!\n&quot;;
       exit(-1);
       }

       char zei;
       while(Quelle.get(zei))
       {
       cout&lt;&lt; zei;
       }
    system(&quot;Pause&quot;);

}
</code></pre>
<p>ich bin mir nicht sicher ob man es so machen, wenn es möglichkeiten gibt das einfacher zu machen, zeigt es mir bitte, damit ich es glei lerne</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/177933/problem-mit-dateibehandlung</link><generator>RSS for Node</generator><lastBuildDate>Sun, 20 Sep 2026 04:48:34 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/177933.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 05 Apr 2007 13:25:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit DAteibehandlung on Thu, 05 Apr 2007 13:25:40 GMT]]></title><description><![CDATA[<p>also mein Problem besteht darin das ich eine DAtei auslesen will und ihren inhalt auf dem Bildschirm ausgeben will ich habe shcon ein bisschen was probiert, jedoch geht das nicht.</p>
<pre><code class="language-cpp">#include&lt;cstdlib&gt;
#include&lt;fstream&gt;
#include&lt;iostream&gt;
#include&lt;string&gt;
int main()
{
    ifstream Quelle;
    strin Quellenname;
    cout&lt;&lt;&quot;Geben sie die Datei ein\n&quot;;
    getline(cin,Quellenname);

    Quelle.open(Quellenname.c_str(),ios::binary|ios::in);

    if(!Quelle) {
       cerr&lt;&lt; Quellennamen;
       &lt;&lt;&quot;Kann nicht geoeffnet werde!\n&quot;;
       exit(-1);
       }

       char zei;
       while(Quelle.get(zei))
       {
       cout&lt;&lt; zei;
       }
    system(&quot;Pause&quot;);

}
</code></pre>
<p>ich bin mir nicht sicher ob man es so machen, wenn es möglichkeiten gibt das einfacher zu machen, zeigt es mir bitte, damit ich es glei lerne</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1260081</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1260081</guid><dc:creator><![CDATA[Firefighter]]></dc:creator><pubDate>Thu, 05 Apr 2007 13:25:40 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit DAteibehandlung on Thu, 05 Apr 2007 13:56:48 GMT]]></title><description><![CDATA[<p>Was heißt &quot;geht nicht&quot;? Sollen wir jetzt raten wo der Fehler liegt? (Ich nehme mal an die Fehler im Quellcode sind c&amp;p Fehler, aber da helfen dir ja die Fehlermeldungen des Compilers weiter)</p>
<p>Ansonsten schau doch mal in die C++-FAQ, da steht doch alles drin.</p>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1260127</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1260127</guid><dc:creator><![CDATA[rüdiger]]></dc:creator><pubDate>Thu, 05 Apr 2007 13:56:48 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit DAteibehandlung on Thu, 05 Apr 2007 13:56:59 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile-var-mode-is-viewprofile-and-u-is-1819.html" rel="nofollow">rüdiger</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-8.html" rel="nofollow">Rund um die Programmierung</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-15.html" rel="nofollow">C++</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39405.html" 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/1260128</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1260128</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Thu, 05 Apr 2007 13:56:59 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit DAteibehandlung on Thu, 05 Apr 2007 14:29:44 GMT]]></title><description><![CDATA[<p>Hi,<br />
erstmal hast du ein &quot;g&quot; in der 8ten Zeile vergessen(das heißt doch &quot;string&quot;)<br />
Dann gibt es die schöne Funktion eof() die dir sagt, ob das Dateiende erreicht ist.<br />
Wenn ja dann gibt eof() true zurück, wenn nein ist eof() == false<br />
Also ich würd das so machen:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;conio.h&gt; //Nimm lieber getch() anstatt system(&quot;PAUSE&quot;)
int main(void)
{
  char Eingabe[255] = {'\0',}; //Dann ist der Array(also der String) leer
  char tempStr[255] = {'\0',};
  std :: ifstream Datei;
  std :: cout &lt;&lt; &quot;Dateiname eingeben: &quot;;
  std :: cin.getline(Eingabe,255);
  Datei.open(Eingabe);
  while (Datei.eof() == false)
  {
     Datei.getline(tempStr,255);
     std :: cout &lt;&lt; tempStr &lt;&lt; std :: endl;
  }
  getch();
}
</code></pre>
<p>Habs nicht getestet aber müsste so gehen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1260154</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1260154</guid><dc:creator><![CDATA[Pille456]]></dc:creator><pubDate>Thu, 05 Apr 2007 14:29:44 GMT</pubDate></item></channel></rss>