Why MB_CUR_MAX is un-defined?
<p>I just copy some codes from <a href="http://www.cplusplus.com/reference/cstdlib/wctomb/" rel="nofollow">cplusplus</a>, and run the test program for <code>wctomb</code>: </p>

<pre><code>/* wctomb example */
#include &lt;stdio.h&gt;      /* printf */
#include &lt;stdlib.h&gt;     /* wctomb, wchar_t(C) */

int main() {
  const wchar_t str[] = L"wctomb example";
  const wchar_t* pt;
  char buffer [MB_CUR_MAX];
  int i,length;

  pt = str;
  while (*pt) {
    length = wctomb(buffer,*pt);
    if (length&lt;1) break;
    for (i=0;i&lt;length;++i) printf ("[%c]",buffer[i]);
    ++pt;
  }

  return 0;
}
</code></pre>

<p>However, the program cannot be compiled because MB_CUR_MAX is undefined as far as my compiler (VC 2010) is considered. I was wondering what I should do. Thanks!</p>

<pre><code>error C2057: expected constant expression
error C2466: cannot allocate an array of constant size 0
error C2133: 'buffer' : unknown size
</code></pre>
