<?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[Dateigröße ausgeben]]></title><description><![CDATA[<p>Hall Leute,<br />
ich bin dabei bei einer Datei die Größe der Datei(z.B: in Bytes)<br />
auszulsen. Ich habe folgendes geschrieben:</p>
<pre><code>DWORD SizehWnd;

SizehWnd = GetFileSize(&quot;C:\\Users\\Patrick\\Downloads\\txt3.txt&quot;,0);
char sze[300];

sprintf_s(sze,&quot;%f&quot;,SizehWnd);
MessageBox(0,TEXT(sze),TEXT(&quot;Dateigröße&quot;),MB_OKCANCEL | MB_ICONWARNING);
</code></pre>
<p>Doch die MessageBox sagt, dass es iwie -928989898... gr0ß ist.<br />
Die datei ist in echt 62 bytes groß.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/323482/dateigröße-ausgeben</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Jul 2026 22:29:12 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/323482.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 01 Feb 2014 09:06:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Dateigröße ausgeben on Sat, 01 Feb 2014 09:06:38 GMT]]></title><description><![CDATA[<p>Hall Leute,<br />
ich bin dabei bei einer Datei die Größe der Datei(z.B: in Bytes)<br />
auszulsen. Ich habe folgendes geschrieben:</p>
<pre><code>DWORD SizehWnd;

SizehWnd = GetFileSize(&quot;C:\\Users\\Patrick\\Downloads\\txt3.txt&quot;,0);
char sze[300];

sprintf_s(sze,&quot;%f&quot;,SizehWnd);
MessageBox(0,TEXT(sze),TEXT(&quot;Dateigröße&quot;),MB_OKCANCEL | MB_ICONWARNING);
</code></pre>
<p>Doch die MessageBox sagt, dass es iwie -928989898... gr0ß ist.<br />
Die datei ist in echt 62 bytes groß.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2380952</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2380952</guid><dc:creator><![CDATA[MeinName]]></dc:creator><pubDate>Sat, 01 Feb 2014 09:06:38 GMT</pubDate></item><item><title><![CDATA[Reply to Dateigröße ausgeben on Sat, 01 Feb 2014 09:37:33 GMT]]></title><description><![CDATA[<p>%f schreibt einen float, kein unsigned int. Du willst %u statt %f.</p>
<p>In richtigem C++ wäre das übrigens nicht passiert:</p>
<pre><code>#include &lt;string&gt;
DWORD SizehWnd = GetFileSize(&quot;C:\\Users\\Patrick\\Downloads\\txt3.txt&quot;,0);
MessageBox(0,TEXT(std::to_string(SizehWnd).c_str()),TEXT(&quot;Dateigröße&quot;),MB_OKCANCEL | MB_ICONWARNING);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2380955</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2380955</guid><dc:creator><![CDATA[nwp3]]></dc:creator><pubDate>Sat, 01 Feb 2014 09:37:33 GMT</pubDate></item><item><title><![CDATA[Reply to Dateigröße ausgeben on Sat, 01 Feb 2014 10:09:12 GMT]]></title><description><![CDATA[<p>Mhh jetzt steht da irgendwie diese Zahl 492...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2380956</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2380956</guid><dc:creator><![CDATA[MeinName]]></dc:creator><pubDate>Sat, 01 Feb 2014 10:09:12 GMT</pubDate></item><item><title><![CDATA[Reply to Dateigröße ausgeben on Sat, 01 Feb 2014 10:46:02 GMT]]></title><description><![CDATA[<pre><code>std::ifstream is(&quot;bla.foo&quot;, std::ios::binary);
is.seekg(0, std::ios::end);
std::cout &lt;&lt; &quot;size = &quot; &lt;&lt; is.tellg() &lt;&lt; std::endl;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2380960</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2380960</guid><dc:creator><![CDATA[großbuchstaben]]></dc:creator><pubDate>Sat, 01 Feb 2014 10:46:02 GMT</pubDate></item><item><title><![CDATA[Reply to Dateigröße ausgeben on Sat, 01 Feb 2014 11:35:58 GMT]]></title><description><![CDATA[<p>großbuchstaben schrieb:</p>
<blockquote>
<pre><code>std::ifstream is(&quot;bla.foo&quot;, std::ios::binary);
is.seekg(0, std::ios::end);
std::cout &lt;&lt; &quot;size = &quot; &lt;&lt; is.tellg() &lt;&lt; std::endl;
</code></pre>
</blockquote>
<p>Danke und wie kann ich das in eine MessageBox machen, denn da steht dann immer noch 0.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2380968</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2380968</guid><dc:creator><![CDATA[MeinNAme]]></dc:creator><pubDate>Sat, 01 Feb 2014 11:35:58 GMT</pubDate></item><item><title><![CDATA[Reply to Dateigröße ausgeben on Sat, 01 Feb 2014 12:05:49 GMT]]></title><description><![CDATA[<p>MeinNAme schrieb:</p>
<blockquote>
<p>großbuchstaben schrieb:</p>
<blockquote>
<pre><code>std::ifstream is(&quot;bla.foo&quot;, std::ios::binary);
is.seekg(0, std::ios::end);
std::cout &lt;&lt; &quot;size = &quot; &lt;&lt; is.tellg() &lt;&lt; std::endl;
</code></pre>
</blockquote>
<p>Danke und wie kann ich das in eine MessageBox machen, denn da steht dann immer noch 0.</p>
</blockquote>
<p>hat mit c++ nichts am hut. gib es doch einfach in der konsole aus?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2380971</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2380971</guid><dc:creator><![CDATA[Fytch]]></dc:creator><pubDate>Sat, 01 Feb 2014 12:05:49 GMT</pubDate></item><item><title><![CDATA[Reply to Dateigröße ausgeben on Sat, 01 Feb 2014 19:14:15 GMT]]></title><description><![CDATA[<p>MeinNAme schrieb:</p>
<blockquote>
<p>Danke und wie kann ich das in eine MessageBox machen, denn da steht dann immer noch 0.</p>
</blockquote>
<p>welche Plattform denn? bei mir geht das mit</p>
<pre><code>std::ifstream in(&quot;bla.foo&quot;, std::ios::binary);
  in.seekg(0, std::ios::end);
  std::ostringstream os;
  os &lt;&lt; &quot;xmessage \&quot;size= &quot; &lt;&lt; in.tellg() &lt;&lt; &quot;\&quot;&quot;;
  system(os.str().c_str());
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2381042</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2381042</guid><dc:creator><![CDATA[großbuchstaben]]></dc:creator><pubDate>Sat, 01 Feb 2014 19:14:15 GMT</pubDate></item></channel></rss>