<?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[int(*foo[2])[8][8]   =  int foo[2][6][8][8] ?]]></title><description><![CDATA[<p>hey leute,</p>
<p>ich arbeite gerade an einer Umsetzung für den x264 Encoder und bin in der Datei<br />
&quot;encoder.c&quot; auf folgende Zeilen gestoßen:</p>
<pre><code>[..108..]

int             (*dequant4_mf[6])[4][4]; /* [6][6][4][4] */
int             (*dequant8_mf[2])[8][8]; /* [2][6][8][8] */
int             (*quant4_mf[6])[4][4];   /* [6][6][4][4] */
int             (*quant8_mf[2])[8][8];   /* [2][6][8][8] */

[..113..]
</code></pre>
<p>hat jemand eine Idee was her geschiet ? Ich verstehe nicht was die Kommentare zu beudeute haben und es scheint, dass zB. dass</p>
<p>(*quant4_mf[6])[4][4] ~= quant4_mf[6][6][4][4]</p>
<p>Kann mir jemand erklären was hier passiert ?</p>
<p>Danke im Voraus <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title="=)"
      alt="🙂"
    /></p>
<p>.do</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/195642/int-foo-2-8-8-int-foo-2-6-8-8</link><generator>RSS for Node</generator><lastBuildDate>Wed, 30 Sep 2026 05:00:51 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/195642.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 20 Oct 2007 03:45:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to int(*foo[2])[8][8]   =  int foo[2][6][8][8] ? on Sat, 20 Oct 2007 03:45:20 GMT]]></title><description><![CDATA[<p>hey leute,</p>
<p>ich arbeite gerade an einer Umsetzung für den x264 Encoder und bin in der Datei<br />
&quot;encoder.c&quot; auf folgende Zeilen gestoßen:</p>
<pre><code>[..108..]

int             (*dequant4_mf[6])[4][4]; /* [6][6][4][4] */
int             (*dequant8_mf[2])[8][8]; /* [2][6][8][8] */
int             (*quant4_mf[6])[4][4];   /* [6][6][4][4] */
int             (*quant8_mf[2])[8][8];   /* [2][6][8][8] */

[..113..]
</code></pre>
<p>hat jemand eine Idee was her geschiet ? Ich verstehe nicht was die Kommentare zu beudeute haben und es scheint, dass zB. dass</p>
<p>(*quant4_mf[6])[4][4] ~= quant4_mf[6][6][4][4]</p>
<p>Kann mir jemand erklären was hier passiert ?</p>
<p>Danke im Voraus <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title="=)"
      alt="🙂"
    /></p>
<p>.do</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1388801</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1388801</guid><dc:creator><![CDATA[.dorian]]></dc:creator><pubDate>Sat, 20 Oct 2007 03:45:20 GMT</pubDate></item><item><title><![CDATA[Reply to int(*foo[2])[8][8]   =  int foo[2][6][8][8] ? on Sat, 20 Oct 2007 08:38:35 GMT]]></title><description><![CDATA[<p>(*quant4_mf[6])[4][4] ist nicht das gleiche wie quant4_mf[6][6][4][4], weil (*quant4_mf[6])[4][4] ist ein array auf pointer auf array auf array auf int.</p>
<p>dh: mit (*quant4_mf[6])[4][4] hast du ein array von 6 pointern, und jeder dieser pointer zeigt auf ein zweidimensionales array vom typ int(*)[4];</p>
<p>mit quant4_mf[6][6][4][4] hast du aber ein vierdimensionales array vom typ int(*)[6][4][4]</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1388839</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1388839</guid><dc:creator><![CDATA[Gaste]]></dc:creator><pubDate>Sat, 20 Oct 2007 08:38:35 GMT</pubDate></item><item><title><![CDATA[Reply to int(*foo[2])[8][8]   =  int foo[2][6][8][8] ? on Sat, 20 Oct 2007 11:45:44 GMT]]></title><description><![CDATA[<p>Man könnte aber das hier machen:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;

using namespace std;

int main()
{
    int (*quant4_mf[6])[4][4];
    for(int i = 0; i &lt; 6; ++i)
    {
        quant4_mf[i] = new int[6][4][4];
    }
    for(int i = 0; i &lt; 6; ++i)
    {
        for(int j = 0; j &lt; 6; ++j)
        {
            for(int k = 0; k &lt; 4; ++k)
            {
                for(int l = 0; l &lt; 4; ++l)
                {
                    cout &lt;&lt; quant4_mf[i][j][k][l] &lt;&lt; endl; //Array ist uninitialisiert, d.h. zufällige Werte
                }
            }
        }
    }
}
</code></pre>
<p>und hätte dann in quant4_mf ein int[6][6][4][4]. (Jedenfalls solange man mit dem normalen Indexzugriff arbeitet. Die Elemente liegen ja relativ sicher nicht alle hintereinander im Speicher.</p>
<p>Felix</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1388916</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1388916</guid><dc:creator><![CDATA[Phoemuex]]></dc:creator><pubDate>Sat, 20 Oct 2007 11:45:44 GMT</pubDate></item></channel></rss>