<?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[File problem]]></title><description><![CDATA[<p>Hi!<br />
Ich hab ein sehr seltsames Problem, das eigentlich nicht sein dürfte: Ich benutze Dev C++ 4.9.9.2 (Mingw afaik).<br />
Bei folgendem Code kriege ich vom Compiler Fehlermeldungen dass &quot;fstream&quot; undefiniert sei. Welche Include-Datei(en) muss ich denn einbinden um über &quot;normales&quot; C++ eine Datei zu öffnen? Liegt der Fehler vll daran dass ich gleichzeitig auch noch windows.h und sstream.h includet habe?</p>
<pre><code class="language-cpp">#include &lt;fstream&gt;
    fstream stream;
    stream.open(filename, ios::app | ios::out);
    stream&lt;&lt;value&lt;&lt;std::endl;
    stream.close();
</code></pre>
<p>Normalerweise klappt das Öffnen von Datein problemlos. Beim Dev C++ 4.9.9.1 geht es auch noch, jetzt bekomme ich aber ne deprecated-warnung und es geht nicht (siehe oben).</p>
<p>danke<br />
chris90</p>
<p>PS: FROHE WEIHNACHTEN! :xmas2:</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/130577/file-problem</link><generator>RSS for Node</generator><lastBuildDate>Wed, 26 Aug 2026 16:15:47 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/130577.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 24 Dec 2005 15:02:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to File problem on Sat, 24 Dec 2005 15:03:27 GMT]]></title><description><![CDATA[<p>Hi!<br />
Ich hab ein sehr seltsames Problem, das eigentlich nicht sein dürfte: Ich benutze Dev C++ 4.9.9.2 (Mingw afaik).<br />
Bei folgendem Code kriege ich vom Compiler Fehlermeldungen dass &quot;fstream&quot; undefiniert sei. Welche Include-Datei(en) muss ich denn einbinden um über &quot;normales&quot; C++ eine Datei zu öffnen? Liegt der Fehler vll daran dass ich gleichzeitig auch noch windows.h und sstream.h includet habe?</p>
<pre><code class="language-cpp">#include &lt;fstream&gt;
    fstream stream;
    stream.open(filename, ios::app | ios::out);
    stream&lt;&lt;value&lt;&lt;std::endl;
    stream.close();
</code></pre>
<p>Normalerweise klappt das Öffnen von Datein problemlos. Beim Dev C++ 4.9.9.1 geht es auch noch, jetzt bekomme ich aber ne deprecated-warnung und es geht nicht (siehe oben).</p>
<p>danke<br />
chris90</p>
<p>PS: FROHE WEIHNACHTEN! :xmas2:</p>
]]></description><link>https://www.c-plusplus.net/forum/post/949256</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/949256</guid><dc:creator><![CDATA[chris90]]></dc:creator><pubDate>Sat, 24 Dec 2005 15:03:27 GMT</pubDate></item><item><title><![CDATA[Reply to File problem on Sat, 24 Dec 2005 15:31:15 GMT]]></title><description><![CDATA[<p>Nabend,</p>
<blockquote>
<p>...jetzt bekomme ich aber ne deprecated-warnung...</p>
</blockquote>
<p>die da waere? Hab meine Glaskugel leider in Reparatur ;).</p>
<p>Die Klasse 'fstream' liegt, wie fast alles in C++ (mit Ausnahme von Makros), im Namensraum 'std'. Du musst<br />
entweder den Namensraum oeffnen (using-Anweisung):</p>
<pre><code class="language-cpp">using namespace std;
</code></pre>
<p>oder du sagst dem Compiler, was du explizit aus diesem Namensraum verwenden willst (using-Deklaration):</p>
<pre><code class="language-cpp">using std::fstream;
</code></pre>
<p>oder du gibst das Ganze als 'full-qualified-name' an:</p>
<pre><code class="language-cpp">std::fstream ...
</code></pre>
<p>mfg<br />
v R</p>
]]></description><link>https://www.c-plusplus.net/forum/post/949271</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/949271</guid><dc:creator><![CDATA[virtuell Realisticer]]></dc:creator><pubDate>Sat, 24 Dec 2005 15:31:15 GMT</pubDate></item><item><title><![CDATA[Reply to File problem on Sat, 24 Dec 2005 17:15:48 GMT]]></title><description><![CDATA[<p>Vielen Dank, virtuell Realisticer!<br />
Hab das std:: vergessen *dotz*</p>
<p>fw<br />
chris90</p>
]]></description><link>https://www.c-plusplus.net/forum/post/949323</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/949323</guid><dc:creator><![CDATA[chris90]]></dc:creator><pubDate>Sat, 24 Dec 2005 17:15:48 GMT</pubDate></item></channel></rss>