<?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[Größe von Ganzzahl-Datentypen]]></title><description><![CDATA[<p>Hi, ich habe mal eine Frage zu int-Datentypen (passt wohl auch zu anderen Typen):</p>
<p>Wie groß ist ein char,byte,int denn nun. Laut MS-Hilfe<br />
char 1 byte<br />
unsigned char 1 byte<br />
short 2 byte<br />
long 4 byte<br />
usw.</p>
<p>lediglich int und unsigned int haben demnach Systemabhängige Größen. Andere Quellen sprechen dagegen von völliger Implementierunsabhängigkeit dieser Größen. Lediglich size(char) &lt;= size(short) &lt;= ... und size(char) mind. 1 byte ist demnach sicher vorrausgestzt.</p>
<p>Wer hat denn nun Recht?</p>
<p>Und was ist mit den MS VS C++ - Typen _int8, _int16, ...<br />
Das sind sicher reine MS-Erfindungen die mit dem Standard nichts zu tun haben, oder?</p>
<p>Viele Grüße <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/124298/größe-von-ganzzahl-datentypen</link><generator>RSS for Node</generator><lastBuildDate>Sun, 23 Aug 2026 22:48:04 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/124298.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 Oct 2005 11:27:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Größe von Ganzzahl-Datentypen on Wed, 26 Oct 2005 11:27:57 GMT]]></title><description><![CDATA[<p>Hi, ich habe mal eine Frage zu int-Datentypen (passt wohl auch zu anderen Typen):</p>
<p>Wie groß ist ein char,byte,int denn nun. Laut MS-Hilfe<br />
char 1 byte<br />
unsigned char 1 byte<br />
short 2 byte<br />
long 4 byte<br />
usw.</p>
<p>lediglich int und unsigned int haben demnach Systemabhängige Größen. Andere Quellen sprechen dagegen von völliger Implementierunsabhängigkeit dieser Größen. Lediglich size(char) &lt;= size(short) &lt;= ... und size(char) mind. 1 byte ist demnach sicher vorrausgestzt.</p>
<p>Wer hat denn nun Recht?</p>
<p>Und was ist mit den MS VS C++ - Typen _int8, _int16, ...<br />
Das sind sicher reine MS-Erfindungen die mit dem Standard nichts zu tun haben, oder?</p>
<p>Viele Grüße <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/901068</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901068</guid><dc:creator><![CDATA[LAOES]]></dc:creator><pubDate>Wed, 26 Oct 2005 11:27:57 GMT</pubDate></item><item><title><![CDATA[Reply to Größe von Ganzzahl-Datentypen on Wed, 26 Oct 2005 11:35:43 GMT]]></title><description><![CDATA[<p>Laut Standard gilt lediglich:<br />
sizeof(char)==1</p>
<p>Für alle anderen Typen sind bestimmte Mindestgrößen sichergestellt (short/int: 2 Byte, long 4 Byte) und daß immer short&lt;=int&lt;=long gilt.</p>
<p>(und &quot;unsigned xyz&quot; hat die selbe Größe wie &quot;signed xyz&quot;)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/901073</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901073</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Wed, 26 Oct 2005 11:35:43 GMT</pubDate></item><item><title><![CDATA[Reply to Größe von Ganzzahl-Datentypen on Wed, 26 Oct 2005 11:40:53 GMT]]></title><description><![CDATA[<p>In der limits.h (oder climits) stehen auch noch die maximalen und minimalen Werte der jeweiligen Datentypen drin.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/901078</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901078</guid><dc:creator><![CDATA[GPC]]></dc:creator><pubDate>Wed, 26 Oct 2005 11:40:53 GMT</pubDate></item><item><title><![CDATA[Reply to Größe von Ganzzahl-Datentypen on Wed, 26 Oct 2005 13:24:58 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include&lt;iostream&gt;
#include&lt;limits&gt;

int main() {
   std::cout &lt;&lt; &quot;Zahlenbereich für int\n&quot; &lt;&lt; numeric_limits&lt;int&gt;::min() &lt;&lt; &quot; bis &quot; &lt;&lt; numeric_limits&lt;int&gt;::max() &lt;&lt; endl;
}
//Zahlenbereich für Datentyp int
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/901181</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901181</guid><dc:creator><![CDATA[Numeric-Limits]]></dc:creator><pubDate>Wed, 26 Oct 2005 13:24:58 GMT</pubDate></item><item><title><![CDATA[Reply to Größe von Ganzzahl-Datentypen on Wed, 26 Oct 2005 13:44:22 GMT]]></title><description><![CDATA[<p>LAOES schrieb:</p>
<blockquote>
<p>Und was ist mit den MS VS C++ - Typen _int8, _int16, ...<br />
Das sind sicher reine MS-Erfindungen die mit dem Standard nichts zu tun haben, oder?</p>
</blockquote>
<p>das sind compiler-spezifische erweiterungen. &lt;stdint.h&gt; ist aber standard (afaik c-standard) und enthält typen mit festgelegten größen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/901196</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901196</guid><dc:creator><![CDATA[terraner]]></dc:creator><pubDate>Wed, 26 Oct 2005 13:44:22 GMT</pubDate></item><item><title><![CDATA[Reply to Größe von Ganzzahl-Datentypen on Wed, 26 Oct 2005 15:36:49 GMT]]></title><description><![CDATA[<p>LAOES schrieb:</p>
<blockquote>
<p>Hi, ich habe mal eine Frage zu int-Datentypen (passt wohl auch zu anderen Typen):</p>
<p>Wie groß ist ein char,byte,int denn nun.</p>
</blockquote>
<p>Implementationsspezifisch. Die Grösse auf dem jeweiligen System kannst du mit sizeof bestimmen.</p>
<p>CStoll schrieb:</p>
<blockquote>
<p>Für alle anderen Typen sind bestimmte Mindestgrößen sichergestellt (short/int: 2 Byte, long 4 Byte)</p>
</blockquote>
<p>Nicht mal das. Lediglich die Relation ist sichergestellt, so dass zB ein long immer mindestens so gross ist wie ein short.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/901277</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901277</guid><dc:creator><![CDATA[groovemaster]]></dc:creator><pubDate>Wed, 26 Oct 2005 15:36:49 GMT</pubDate></item></channel></rss>