<?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[Bytes einer Datei herusfinden]]></title><description><![CDATA[<p>Hi, wie kann ich herausfinden wie viele Bytes eine Datei hat die ich mit fstream öffne ???</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/145997/bytes-einer-datei-herusfinden</link><generator>RSS for Node</generator><lastBuildDate>Thu, 03 Sep 2026 13:16:33 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/145997.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 03 May 2006 10:10:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bytes einer Datei herusfinden on Wed, 03 May 2006 10:10:29 GMT]]></title><description><![CDATA[<p>Hi, wie kann ich herausfinden wie viele Bytes eine Datei hat die ich mit fstream öffne ???</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1050149</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1050149</guid><dc:creator><![CDATA[BuilderXYZ]]></dc:creator><pubDate>Wed, 03 May 2006 10:10:29 GMT</pubDate></item><item><title><![CDATA[Reply to Bytes einer Datei herusfinden on Wed, 03 May 2006 10:29:43 GMT]]></title><description><![CDATA[<p>Mit Standard C++ gibt es keinen 100% sicheren Weg. Aber folgendes dürfte in den meisten Fällen reichen:</p>
<pre><code class="language-cpp">#include &lt;fstream&gt;
#include &lt;iostream&gt;

template&lt;typename Char, typename Traits&gt;
typename std::basic_istream&lt;Char,Traits&gt;::pos_type file_size
                                          (std::basic_istream&lt;Char,Traits&gt; &amp;in)
{
  in.seekg(0, std::basic_ios&lt;Char,Traits&gt;::end);
  return in.tellg();
}

int main() {
  std::ifstream in(&quot;fsize.cpp&quot;);
  std::cout &lt;&lt; file_size(in) &lt;&lt; '\n';
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1050165</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1050165</guid><dc:creator><![CDATA[rüdiger]]></dc:creator><pubDate>Wed, 03 May 2006 10:29:43 GMT</pubDate></item><item><title><![CDATA[Reply to Bytes einer Datei herusfinden on Wed, 03 May 2006 16:43:54 GMT]]></title><description><![CDATA[<p>Hi!</p>
<p>Der Funktionszeiger sollte aber noch auf die ursprüngliche Position zurückgesetzt werden.</p>
<p>grüße</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1050404</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1050404</guid><dc:creator><![CDATA[David_pb]]></dc:creator><pubDate>Wed, 03 May 2006 16:43:54 GMT</pubDate></item><item><title><![CDATA[Reply to Bytes einer Datei herusfinden on Wed, 03 May 2006 20:33:04 GMT]]></title><description><![CDATA[<p>Es gibt in <a href="http://boost.org/libs/filesystem/doc/index.htm" rel="nofollow">boost::filesystem</a> eine Operation namens <a href="http://boost.org/libs/filesystem/doc/operations.htm#file_size" rel="nofollow">file_size</a>.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1050566</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1050566</guid><dc:creator><![CDATA[winheis]]></dc:creator><pubDate>Wed, 03 May 2006 20:33:04 GMT</pubDate></item><item><title><![CDATA[Reply to Bytes einer Datei herusfinden on Wed, 03 May 2006 21:10:11 GMT]]></title><description><![CDATA[<p>Hi.</p>
<p>Wieso sollte man immer bei Standard bleiben?</p>
<p>Schadet das uns etwa?</p>
<p>Was ist denn standard und was ist nicht standard?</p>
<p>MfG<br />
Technology</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1050577</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1050577</guid><dc:creator><![CDATA[technology]]></dc:creator><pubDate>Wed, 03 May 2006 21:10:11 GMT</pubDate></item><item><title><![CDATA[Reply to Bytes einer Datei herusfinden on Thu, 04 May 2006 06:06:37 GMT]]></title><description><![CDATA[<p>Was im Standard definiert ist, kannst du garantiert überall einsetzen (solange dein Compiler ANSI-konform ist), alles andere ist nicht portabel - funktioniert also nur auf einem bestimmten System.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1050619</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1050619</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Thu, 04 May 2006 06:06:37 GMT</pubDate></item></channel></rss>