<?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[Programm mit seekg]]></title><description><![CDATA[<p>Hallo hier wird die Funktion seekg beschrieben:</p>
<p><a href="http://www.cplusplus.com/reference/iostream/istream/seekg/" rel="nofollow">http://www.cplusplus.com/reference/iostream/istream/seekg/</a></p>
<p>Wie kann ich den jetzt überprüfen ob die Funktion erfolgreich ausgeführt wurde oder nicht.</p>
<p>Auf <a href="http://cplusplus.com" rel="nofollow">cplusplus.com</a> steht: The function returns *this. (Hab ich auch nicht ganz verstanden was das heissen soll)</p>
<p>Und ich hab noch gelesen:</p>
<p>Additionally, in any of these cases, if the appropriate flag has been set with member function ios::exceptions, an exception of type ios_base::failure is thrown.</p>
<p><a href="http://www.cplusplus.com/ios::exceptions" rel="nofollow">http://www.cplusplus.com/ios::exceptions</a></p>
<p>Ich hab versucht das mal umzusetzen aber leider ohne Erfolg:</p>
<pre><code class="language-cpp">file.exceptions ( fstream::eofbit | fstream::failbit | fstream::badbit | fstream::goodbit );
  try 
  {
	 file.seekg( 0x14B5 ,ios::beg);

  }

  catch (ifstream::failure e) 
  {
    cout &lt;&lt; &quot;Exception&quot;;
  }
</code></pre>
<p>Das verursacht eine: Abnormal program termination</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/300073/programm-mit-seekg</link><generator>RSS for Node</generator><lastBuildDate>Wed, 12 Aug 2026 23:57:28 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/300073.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 24 Feb 2012 15:22:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Programm mit seekg on Fri, 24 Feb 2012 15:22:01 GMT]]></title><description><![CDATA[<p>Hallo hier wird die Funktion seekg beschrieben:</p>
<p><a href="http://www.cplusplus.com/reference/iostream/istream/seekg/" rel="nofollow">http://www.cplusplus.com/reference/iostream/istream/seekg/</a></p>
<p>Wie kann ich den jetzt überprüfen ob die Funktion erfolgreich ausgeführt wurde oder nicht.</p>
<p>Auf <a href="http://cplusplus.com" rel="nofollow">cplusplus.com</a> steht: The function returns *this. (Hab ich auch nicht ganz verstanden was das heissen soll)</p>
<p>Und ich hab noch gelesen:</p>
<p>Additionally, in any of these cases, if the appropriate flag has been set with member function ios::exceptions, an exception of type ios_base::failure is thrown.</p>
<p><a href="http://www.cplusplus.com/ios::exceptions" rel="nofollow">http://www.cplusplus.com/ios::exceptions</a></p>
<p>Ich hab versucht das mal umzusetzen aber leider ohne Erfolg:</p>
<pre><code class="language-cpp">file.exceptions ( fstream::eofbit | fstream::failbit | fstream::badbit | fstream::goodbit );
  try 
  {
	 file.seekg( 0x14B5 ,ios::beg);

  }

  catch (ifstream::failure e) 
  {
    cout &lt;&lt; &quot;Exception&quot;;
  }
</code></pre>
<p>Das verursacht eine: Abnormal program termination</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2185250</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2185250</guid><dc:creator><![CDATA[file.seekg]]></dc:creator><pubDate>Fri, 24 Feb 2012 15:22:01 GMT</pubDate></item><item><title><![CDATA[Reply to Programm mit seekg on Fri, 24 Feb 2012 15:25:11 GMT]]></title><description><![CDATA[<p>Das bedeutet, dass die Funktion den Stream selbst zurückgibt. Da Streams nach bool konvertierbar sind, kannst du schreiben:</p>
<pre><code class="language-cpp">if(stream.seekg(...))
    // tu was
</code></pre>
<p>Es ist übrigens normalerweise keine gute Idee, Exceptions an den Streams anzumachen. Die Texte sind nämlich meist nicht besonders hilfreich. Schmeiß lieber deine eigene Exception mit einer besseren Beschreibung.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2185251</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2185251</guid><dc:creator><![CDATA[314159265358979__]]></dc:creator><pubDate>Fri, 24 Feb 2012 15:25:11 GMT</pubDate></item></channel></rss>