<?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[ifstream - lesen]]></title><description><![CDATA[<p>Wenn ich bei meinem ifstream Obejkt bis zum Ende einer .txt Datei mit getline() gelesen habe, kann ich getline() dann irgendwie wieder auf den anfang zurücksetzen?<br />
Ich hab gedacht es reicht wenn ich IFSTREAM_OBJEKT.clear() mache, da is danach aber nur mein IFSTREAM_OBJEKT == true, aber lesen tut er trotzdem nicht mehr?<br />
Was tun?</p>
<p>MfG<br />
Stromberg</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/212882/ifstream-lesen</link><generator>RSS for Node</generator><lastBuildDate>Wed, 14 Oct 2026 15:30:37 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/212882.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 11 May 2008 21:04:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ifstream - lesen on Sun, 11 May 2008 21:04:06 GMT]]></title><description><![CDATA[<p>Wenn ich bei meinem ifstream Obejkt bis zum Ende einer .txt Datei mit getline() gelesen habe, kann ich getline() dann irgendwie wieder auf den anfang zurücksetzen?<br />
Ich hab gedacht es reicht wenn ich IFSTREAM_OBJEKT.clear() mache, da is danach aber nur mein IFSTREAM_OBJEKT == true, aber lesen tut er trotzdem nicht mehr?<br />
Was tun?</p>
<p>MfG<br />
Stromberg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1507196</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1507196</guid><dc:creator><![CDATA[Stromberg]]></dc:creator><pubDate>Sun, 11 May 2008 21:04:06 GMT</pubDate></item><item><title><![CDATA[Reply to ifstream - lesen on Sun, 11 May 2008 21:33:04 GMT]]></title><description><![CDATA[<p>Ähm gibt es da nicht Methoden wie Seek und Peek oder so?<br />
Wenn nich, schließ die Datei halt und öffne sie erneut?</p>
<p>Gruß Tobi.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1507208</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1507208</guid><dc:creator><![CDATA[T0bi]]></dc:creator><pubDate>Sun, 11 May 2008 21:33:04 GMT</pubDate></item><item><title><![CDATA[Reply to ifstream - lesen on Sun, 11 May 2008 22:06:27 GMT]]></title><description><![CDATA[<p>nimm <code>std::ifstream::seekg( )</code> .</p>
<p>cheers, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1507229</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1507229</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Sun, 11 May 2008 22:06:27 GMT</pubDate></item><item><title><![CDATA[Reply to ifstream - lesen on Sun, 11 May 2008 22:28:58 GMT]]></title><description><![CDATA[<p>Ja, es klappt, wenn ich:</p>
<pre><code class="language-cpp">seekg(static_cast&lt;streamoff&gt;(0),ios::beg);
</code></pre>
<p>mache dann bin ich wieder am Anfang. Aber warum reicht clear() nicht? Ich hab gedacht clear() würde auch den Schreibzeiger zurücksetzen, aber anscheinend nicht oder?!</p>
<p>MfG<br />
Stromberg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1507237</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1507237</guid><dc:creator><![CDATA[Stromberg]]></dc:creator><pubDate>Sun, 11 May 2008 22:28:58 GMT</pubDate></item><item><title><![CDATA[Reply to ifstream - lesen on Mon, 12 May 2008 21:32:25 GMT]]></title><description><![CDATA[<p><code>clear( )</code> setzt nur den Status des Streams zurück, nicht die Position. Den Cast und die Angabe und den Way ( <code>ios::beg</code> ) kannst Du Dir übrigens sparen. Ein einfaches <code>seekg( 0 )</code> tut's auch ;).</p>
<p>cheers, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1507774</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1507774</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Mon, 12 May 2008 21:32:25 GMT</pubDate></item></channel></rss>