title: C++ Initialize String Array
body: <p>I'm trying to initialize an array on strings but there's an error. Note: this works for <code>int arrays</code>.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace std;
  
  int main()
  {
      int n;
      cin &gt;&gt; n;
      string names[n];   //error here
  }
  </code></pre>