<?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[Flags]]></title><description><![CDATA[<p>hab da mal ne frage<br />
wie groß darf die nr eines flags sein</p>
<p>einen flag definiert man ja so (als decimal im quadrat)<br />
#define MYFLAG_A 1<br />
#define MYFLAG_B 2<br />
#define MYFLAG_C 4<br />
#define MYFLAG_C 8<br />
#define MYFLAG_C 16<br />
...<br />
oder als Hex<br />
#define MYFLAG_A 0x1<br />
#define MYFLAG_B 0x2<br />
...<br />
#define MYFLAG_C 0x8<br />
#define MYFLAG_A 0x10<br />
#define MYFLAG_B 0x20<br />
...<br />
wie groß darf nun quadratzahl bzw Hex zahl werden</p>
<p>mfg<br />
LowFly</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/158712/flags</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Jul 2026 20:42:34 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/158712.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 07 Sep 2006 21:31:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Flags on Thu, 07 Sep 2006 21:31:54 GMT]]></title><description><![CDATA[<p>hab da mal ne frage<br />
wie groß darf die nr eines flags sein</p>
<p>einen flag definiert man ja so (als decimal im quadrat)<br />
#define MYFLAG_A 1<br />
#define MYFLAG_B 2<br />
#define MYFLAG_C 4<br />
#define MYFLAG_C 8<br />
#define MYFLAG_C 16<br />
...<br />
oder als Hex<br />
#define MYFLAG_A 0x1<br />
#define MYFLAG_B 0x2<br />
...<br />
#define MYFLAG_C 0x8<br />
#define MYFLAG_A 0x10<br />
#define MYFLAG_B 0x20<br />
...<br />
wie groß darf nun quadratzahl bzw Hex zahl werden</p>
<p>mfg<br />
LowFly</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1133336</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1133336</guid><dc:creator><![CDATA[LowFly]]></dc:creator><pubDate>Thu, 07 Sep 2006 21:31:54 GMT</pubDate></item><item><title><![CDATA[Reply to Flags on Thu, 07 Sep 2006 21:59:21 GMT]]></title><description><![CDATA[<p>Das kommt auf den Datentyp an, der später deine Flags speichern soll.</p>
<p>Bei BYTE bzw. alle 8 bit Datentypen =&gt; maximaler Wert = (2 hoch <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--smiling_face_with_sunglasses"
      title="8)"
      alt="😎"
    /> -1<br />
Bei SHORT bzw. alle 16 bit Datentypen =&gt; maximaler Wert = (2 hoch 16) -1<br />
Bei INT bzw. alle 32 bit Datentypen =&gt; maximaler Wert = (2 hoch 32) -1<br />
Bei DWORD64 bzw. alle 64 bit Datentypen =&gt; maximaler Wert = (2 hoch 64) -1</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1133347</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1133347</guid><dc:creator><![CDATA[NickHappy]]></dc:creator><pubDate>Thu, 07 Sep 2006 21:59:21 GMT</pubDate></item><item><title><![CDATA[Reply to Flags on Thu, 07 Sep 2006 22:11:47 GMT]]></title><description><![CDATA[<p>was heist das jetzt genau in nullen ausgedrück mit (2 hoch 64) kann ich jetzt nicht wirklich viel anfangen</p>
<p>mfg<br />
LowFly</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1133349</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1133349</guid><dc:creator><![CDATA[LowFly]]></dc:creator><pubDate>Thu, 07 Sep 2006 22:11:47 GMT</pubDate></item><item><title><![CDATA[Reply to Flags on Thu, 07 Sep 2006 22:30:42 GMT]]></title><description><![CDATA[<p>(2 ^ 8 ) -1 = 255<br />
(2 ^ 16 ) -1 = 65535<br />
(2 ^ 32 ) -1 = 4294967295<br />
(2 ^ 64 ) -1 = 18 446 744 073 709 551 615</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1133354</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1133354</guid><dc:creator><![CDATA[NickHappy]]></dc:creator><pubDate>Thu, 07 Sep 2006 22:30:42 GMT</pubDate></item></channel></rss>