title: how to set a FILE** variable to stdout?
body: <p>Mockup of my production code:</p>
  
  <pre><code>/* version 1 */
  #include &lt;stdio.h&gt;
  FILE** fout = &amp;stdout;
  int main() {
       fprintf( *fout, "hello\n" );
  }
  </code></pre>
  
  <p>Works fine under gcc, but reportedly fails to compile under mingw (lvalue required as unary '&amp;' operand).</p>
  
  <p>I have seen <a href="https://stackoverflow.com/q/12008516/1017348">Is setting a FILE* equal to stdout portable?</a>; I understand that</p>
  
  <pre><code>/* version 2 */
  #include &lt;stdio.h&gt;
  int main() {
      FILE* fout = stdout;
      fprintf( fout, "hello\n" );
  }
  </code></pre>
  
  <p>would be perfectly valid. However, I need to preset a global variable. Unfortunately,</p>
  
  <pre><code>/* version 3 */
  #include &lt;stdio.h&gt;
  FILE* fout = stdout;
  int main() {
      fprintf( fout, "hello\n" );
  }
  </code></pre>
  
  <p>is not suitable to replace version 1; it does not even compile under gcc (line 2: initializer element is not constant).</p>
  
  <p>Any idea how to get stdout into a variable that is initialized before main() starts?</p>