title: variable initialization error c++
body: <p>Working on some code using arrays, however I keep getting the error "variable sized object may not be initialized" for the variables in the array even though I initialize them as 0 in the lines before. Here is a piece of my code where the error is.</p>
  
  <pre><code>int main(){
  int x = 0;
  int y = 0;
  int items[x][y] = {}; //Here is where I get the error
  for(string food; cin &gt;&gt; food; x++)
  {
      items[x] = food;
      if(food == "done")
          cout &lt;&lt; "Thank you for inputting.\n";
  }
  for(double price; cin &gt;&gt;price; y++)
  {
      items[y] = price;
      if(price == 0)
      {
          double total;
          total += price;
      }
  }
  </code></pre>
  
  <p>Any help is appreciated. Thanks!</p>