<?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 fstream]]></title><description><![CDATA[<p>Hallo,<br />
ich möchte mit fstream eine datei einlesen was bisher auch immer funktioniert hat (unter windows) aber wenn ich das Programm auf linux starte kann fstream die datei nicht öffnen. Es wird keine fehler angezeigt nur die is_open() funktion gibt false zurück. kann mir da jemand helfen?</p>
<p>Gruß darman96</p>
<p>Edit:</p>
<p>hier der code:</p>
<pre><code class="language-cpp">fstream filestream;
    string line;
    int faceNum = 0;

    filestream.open(&quot;home/erik/Dokumente/block.obj&quot;);

    if(!filestream.is_open()) {

        return 0;

    }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/299767/problem-mit-fstream</link><generator>RSS for Node</generator><lastBuildDate>Thu, 13 Aug 2026 03:12:20 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/299767.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 17 Feb 2012 21:52:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit fstream on Fri, 17 Feb 2012 21:53:33 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich möchte mit fstream eine datei einlesen was bisher auch immer funktioniert hat (unter windows) aber wenn ich das Programm auf linux starte kann fstream die datei nicht öffnen. Es wird keine fehler angezeigt nur die is_open() funktion gibt false zurück. kann mir da jemand helfen?</p>
<p>Gruß darman96</p>
<p>Edit:</p>
<p>hier der code:</p>
<pre><code class="language-cpp">fstream filestream;
    string line;
    int faceNum = 0;

    filestream.open(&quot;home/erik/Dokumente/block.obj&quot;);

    if(!filestream.is_open()) {

        return 0;

    }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2182505</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2182505</guid><dc:creator><![CDATA[darman96]]></dc:creator><pubDate>Fri, 17 Feb 2012 21:53:33 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit fstream on Fri, 17 Feb 2012 22:26:25 GMT]]></title><description><![CDATA[<p>Meinst du wirklich <code>home</code> oder eher <code>/home</code> ?<br />
Außerdem: Nimm <code>ifstream</code> zum Lesen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2182512</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2182512</guid><dc:creator><![CDATA[TyRoXx]]></dc:creator><pubDate>Fri, 17 Feb 2012 22:26:25 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit fstream on Fri, 17 Feb 2012 23:27:07 GMT]]></title><description><![CDATA[<p>muss vor das home auch nen /?<br />
und nochwas wenn ich ne string variable übergebe krieg ich nen fehler.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2182523</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2182523</guid><dc:creator><![CDATA[darman96]]></dc:creator><pubDate>Fri, 17 Feb 2012 23:27:07 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit fstream on Fri, 17 Feb 2012 23:35:46 GMT]]></title><description><![CDATA[<p>darman96 schrieb:</p>
<blockquote>
<p>muss vor das home auch nen /?</p>
</blockquote>
<p>Wenn du das Verzeichnis home meinst, welches im Rootverzeichnis / liegt, dann ja. Wenn du das Verzeichnis home meinst, welches im aktuellen Verzeichnis liegt, nein. Keiner traut es sich dir direkt zu sagen, aber wir wissen anscheinend besser was du meinst, als du selbst <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /> .</p>
<blockquote>
<p>und nochwas wenn ich ne string variable übergebe krieg ich nen fehler.</p>
</blockquote>
<p>Der fstream nimmt ja auch einen const char* und keinen String als Parameter. Guck dir mal an was string::c_str() macht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2182524</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2182524</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Fri, 17 Feb 2012 23:35:46 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit fstream on Fri, 17 Feb 2012 23:52:35 GMT]]></title><description><![CDATA[<p>ich bin auch neu in linux also nicht schlimm. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>warum geht das mit der variable denn im visual studio??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2182530</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2182530</guid><dc:creator><![CDATA[darman96]]></dc:creator><pubDate>Fri, 17 Feb 2012 23:52:35 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit fstream on Sat, 18 Feb 2012 00:44:46 GMT]]></title><description><![CDATA[<p>darman96 schrieb:</p>
<blockquote>
<p>warum geht das mit der variable denn im visual studio??</p>
</blockquote>
<p>Also theoretisch darf eine Implementierung die Standardfunktionen auch überladen. Kann ich mir in diesem Fall aber nicht vorstellen und auch die Dokumentation in der MSDN sagt nichts dazu. Solange ich nicht aus zuverlässiger Quelle etwas anderes höre, schiebe ich das mal auf einen Irrtum deinerseits.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2182536</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2182536</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Sat, 18 Feb 2012 00:44:46 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit fstream on Sat, 18 Feb 2012 09:40:16 GMT]]></title><description><![CDATA[<p>Nein ich hab das auf windows bis jetzt immer mit variablen gemacht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2182606</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2182606</guid><dc:creator><![CDATA[darman96]]></dc:creator><pubDate>Sat, 18 Feb 2012 09:40:16 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit fstream on Sat, 18 Feb 2012 10:37:21 GMT]]></title><description><![CDATA[<p>darman96 schrieb:</p>
<blockquote>
<p>Nein ich hab das auf windows bis jetzt immer mit variablen gemacht.</p>
</blockquote>
<p>Aber wohl eher nicht mit einer vom Typ std::string, oder du verwendest einen c++11 kompatiblen Modus (dasollte das eigentlich gehen). Das könntest du aber auch auf Linux machen (hab den Schalter grade nicht im Kopf).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2182620</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2182620</guid><dc:creator><![CDATA[manni66]]></dc:creator><pubDate>Sat, 18 Feb 2012 10:37:21 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit fstream on Sat, 18 Feb 2012 10:58:36 GMT]]></title><description><![CDATA[<p>doch definitiv mit einer string variable und ob vs2010 c++11 unterstützt weiß ich nicht. hab auf jedenfall nichts eingestellt.</p>
<p>ich hab da noch ne frage zu linux:<br />
wie krieg ich die openGL libs zum laufen??<br />
ich bekomm immer diese fehlermeldung:</p>
<pre><code>/home/erik/Dokumente/C++/OpenGL/objModelLoader/main.cpp|107|Fehler: »GL_TRIANGLE« wurde in diesem Gültigkeitsbereich nicht definiert|
</code></pre>
<p>Edit:<br />
hab auch freeglut installiert und die header dateien includiert.<br />
und die libs<br />
mit -lGL und -lglut so stands im netz</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2182625</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2182625</guid><dc:creator><![CDATA[darman96]]></dc:creator><pubDate>Sat, 18 Feb 2012 10:58:36 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit fstream on Sat, 18 Feb 2012 21:41:39 GMT]]></title><description><![CDATA[<p>keiner ne idee?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2182805</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2182805</guid><dc:creator><![CDATA[darman96]]></dc:creator><pubDate>Sat, 18 Feb 2012 21:41:39 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit fstream on Sat, 18 Feb 2012 22:55:49 GMT]]></title><description><![CDATA[<p>Dir fehlt der passende Header.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2182818</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2182818</guid><dc:creator><![CDATA[Ethon]]></dc:creator><pubDate>Sat, 18 Feb 2012 22:55:49 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit fstream on Sat, 18 Feb 2012 23:29:53 GMT]]></title><description><![CDATA[<p>nein ich sagte doch ich hab die header.<br />
unter windows funktioniert der code mit den selben headern</p>
<p>Edit: problem gelöst es heißt GL_TRIANGLES und nicht GL_TRIANGLE <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>danke für die Hilfe</p>
<p>Gruß darman96</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2182833</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2182833</guid><dc:creator><![CDATA[darman96]]></dc:creator><pubDate>Sat, 18 Feb 2012 23:29:53 GMT</pubDate></item></channel></rss>