title: generate a random string in C++11?
body: <p>I need help with generating a random string using C++11.</p>
  
  <p>I don't know how to continue with that, if you can help me please.</p>
  
  <pre><code>#include &lt;random&gt;
  char * random_string()
  {
  
          static const char alphabet[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
      static const MAX_LEN = 32;  //MAX LENGTH OF THE NEW CHAR RETURNED
      int stringLength = sizeof(alphabet)/sizeof(alphabet[0]);
  
      for (int i = 0; i&lt;=MAX_LEN;i++)
      {
          //now i don't know what i need to do help!
      }
  
      static const char test[MAX_LEN];
  
      return test;
  
  }
  </code></pre>