Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I haven't done this in a while!</p> <p>Start with <code>foo</code> and go right.</p> <p><code>float * (*(*</code><sub><code>foo()</code></sub><code>)[SIZE][SIZE])()</code></p> <blockquote> <p>foo is a function with no arguments...</p> </blockquote> <p>Can't go right since there's a closing parenthesis. Go left:</p> <p><code>float * (*(</code><sub><code>* foo()</code></sub><code>)[SIZE][SIZE])()</code></p> <blockquote> <p>foo is a function with no arguments returning a pointer</p> </blockquote> <p>Can't go left further, so let's cross the parentheses and go right again</p> <p><code>float * (*</code><sub><code>(* foo())</code></sub><code>[SIZE][SIZE])()</code> <code>float * (*</code><sub><code>(* foo())[SIZE]</code></sub><code>[SIZE])()</code> <code>float * (*</code><sub><code>(* foo())[SIZE][SIZE]</code></sub><code>)()</code></p> <blockquote> <p>foo is a function with no arguments returning a pointer to an array of SIZE arrays of SIZE ...</p> </blockquote> <p>Closing parenthesis reached, left again to reach a pointer symbol:</p> <p><code>float * (</code><sub><code>*(* foo())[SIZE][SIZE]</code></sub><code>)()</code></p> <blockquote> <p>foo is a function with no arguments returning a pointer to an array of SIZE arrays of SIZE pointers to ...</p> </blockquote> <p>Left parenthesis again, so we cross it and go right again:</p> <p><code>float *</code><sub><code>( *(* foo())[SIZE][SIZE])</code></sub><code>()</code> <code>float *</code><sub><code>( *(* foo())[SIZE][SIZE])()</code></sub></p> <blockquote> <p>foo is a function with no arguments returning a pointer to an array of SIZE arrays of SIZE pointers to a function with no arguments...</p> </blockquote> <p>And left to the end</p> <p><sub><code>float * ( *(* foo())[SIZE][SIZE])()</code></sub></p> <blockquote> <p>foo is a function with no arguments returning a pointer to an array of SIZE arrays of SIZE pointers to a function with no arguments returning a pointer to float</p> </blockquote> <hr> <p>And whoever wrote that, please teach him to use <code>typedef</code>:</p> <pre><code>// Function that returns a pointer to float typedef float* PFloatFunc (); // Array of pointers to PFloatFunc functions typedef PFloatFunc* PFloatFuncArray2D[SIZE][SIZE]; // Function that returns a pointer to a PFloatFuncArray2D PFloatFuncArray2D* foo(); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload