<?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[GetStatus --- Datei Größe ermitteln]]></title><description><![CDATA[<p>kann mir jemand ein Anwendungsbeispiel geben, für das ermitteln der größe einer Datei?</p>
<p>zum Beispiel einer mp3 datei.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/242218/getstatus-datei-größe-ermitteln</link><generator>RSS for Node</generator><lastBuildDate>Sat, 04 Apr 2026 12:28:07 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/242218.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 01 Jun 2009 07:40:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to GetStatus --- Datei Größe ermitteln on Mon, 01 Jun 2009 07:40:55 GMT]]></title><description><![CDATA[<p>kann mir jemand ein Anwendungsbeispiel geben, für das ermitteln der größe einer Datei?</p>
<p>zum Beispiel einer mp3 datei.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1718918</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1718918</guid><dc:creator><![CDATA[5cript]]></dc:creator><pubDate>Mon, 01 Jun 2009 07:40:55 GMT</pubDate></item><item><title><![CDATA[Reply to GetStatus --- Datei Größe ermitteln on Mon, 01 Jun 2009 07:47:35 GMT]]></title><description><![CDATA[<p>Google ist dein Freund.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1718920</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1718920</guid><dc:creator><![CDATA[ichiban]]></dc:creator><pubDate>Mon, 01 Jun 2009 07:47:35 GMT</pubDate></item><item><title><![CDATA[Reply to GetStatus --- Datei Größe ermitteln on Mon, 01 Jun 2009 07:52:37 GMT]]></title><description><![CDATA[<p>Google will mir nur MFC VC++ (GetFileSize()) geben.<br />
und der rest ist beispiel arm</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1718921</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1718921</guid><dc:creator><![CDATA[5cript]]></dc:creator><pubDate>Mon, 01 Jun 2009 07:52:37 GMT</pubDate></item><item><title><![CDATA[Reply to GetStatus --- Datei Größe ermitteln on Mon, 01 Jun 2009 08:13:45 GMT]]></title><description><![CDATA[<p>ok hab es so gemacht:</p>
<pre><code class="language-cpp">int len;
   string siz;
   ifstream quelle;

   quelle.open(sound[menu].c_str(),ios::binary);
   if(quelle.good())
   {
     quelle.seekg(0L,ios::end);//Geht in der datei bis ans ende
     len=quelle.tellg();//gibt dir die aktuelle position an
     quelle.seekg(0L,ios::beg);//geht in der Datei wieder bis zum anfang
     convert &lt;&lt; len;
     convert &gt;&gt; siz;
     convert.clear();

   //...
   }
   else
   {
     cout&lt;&lt;&quot;Fehler&quot;&lt;&lt;endl;
     quelle.close();
   }

   quelle.close();
</code></pre>
<p>mit fseek</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1718924</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1718924</guid><dc:creator><![CDATA[5cript]]></dc:creator><pubDate>Mon, 01 Jun 2009 08:13:45 GMT</pubDate></item><item><title><![CDATA[Reply to GetStatus --- Datei Größe ermitteln on Mon, 01 Jun 2009 11:41:52 GMT]]></title><description><![CDATA[<p>Du befindest dich hier im WinAPI-Forum,<br />
also solltest du auch auf diese zurückgreifen.</p>
<p>Einfach über CreateFile mit OPEN_EXISTING ein Handle zu einer Datei holen und dann GetFileSize(Handle, &amp;dwSize) aufrufen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1718987</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1718987</guid><dc:creator><![CDATA[peteur]]></dc:creator><pubDate>Mon, 01 Jun 2009 11:41:52 GMT</pubDate></item><item><title><![CDATA[Reply to GetStatus --- Datei Größe ermitteln on Mon, 08 Jun 2009 14:57:02 GMT]]></title><description><![CDATA[<p>Am meiner Ansicht nach einfachsten geht es so:</p>
<pre><code>long length = 0;
FILE *a;
a = fopen (Dateiname, &quot;rb&quot;);
if (a != NULL)
{
fseek(a, 0, SEEK_END);
length = ftell(a);
}
</code></pre>
<p>Allerdings braucht an dazu die stdio.h.<br />
Man kann es auch mit filelength(a-&gt;_file); machen, doch dann muss auch die io.h includiert sein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1723342</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1723342</guid><dc:creator><![CDATA[hackerchecker]]></dc:creator><pubDate>Mon, 08 Jun 2009 14:57:02 GMT</pubDate></item><item><title><![CDATA[Reply to GetStatus --- Datei Größe ermitteln on Mon, 08 Jun 2009 15:09:51 GMT]]></title><description><![CDATA[<p>hackerchecker schrieb:</p>
<blockquote>
<p>Am meiner Ansicht nach einfachsten geht es so:</p>
<pre><code>long length = 0;
FILE *a;
a = fopen (Dateiname, &quot;rb&quot;);
if (a != NULL)
{
fseek(a, 0, SEEK_END);
length = ftell(a);
}
</code></pre>
<p>Allerdings braucht an dazu die stdio.h.<br />
Man kann es auch mit filelength(a-&gt;_file); machen, doch dann muss auch die io.h includiert sein.</p>
</blockquote>
<p>das ruft auch nur die entsprechenden winapi funktionen auf da kann er sie auch gleich direkt benutzen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1723349</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1723349</guid><dc:creator><![CDATA[oberhacker]]></dc:creator><pubDate>Mon, 08 Jun 2009 15:09:51 GMT</pubDate></item><item><title><![CDATA[Reply to GetStatus --- Datei Größe ermitteln on Mon, 08 Jun 2009 22:23:19 GMT]]></title><description><![CDATA[<p>GetFileSize (oder ähnlich)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1723563</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1723563</guid><dc:creator><![CDATA[BarneyBlabus]]></dc:creator><pubDate>Mon, 08 Jun 2009 22:23:19 GMT</pubDate></item></channel></rss>