title: Initialize non-const static member variables in C++, through a static member function
body: <p>I am trying the following and getting an emulator crash between the two log statements. Is there something wrong?</p>
  
  <pre><code>protected:
      static int maxSize;
  public:
      static void setFontSizeRange(int max) {
          Log("here %d-&gt;%d", max, maxSize);
          maxSize = max;
          Log("ok");
      }
  </code></pre>
  
  <p>I can get the log to reproduce the parameter but it crashes before outputting the static member (so the first log shown above would not work while it refers to that).</p>
  
  <p>Thanks.</p>