title: Structures and Arrays VendingMachine
body: <p>Im not exactly sure what makes this syntax incorrect, any answers?
  The assignment is to write a program that simulates a soft drink machine. The program should use a structure that stores the following data. Each time the program runs, it should enter a loop that performs the following steps: 
  A list of drinks is displayed on the screen. The user should be allowed to either quit the program or pick a drink. If the user selects a drink, s/he will next enter the amount of money that is to be inserted into the drink machine.
  The program should display the amount of change that would be returned and subtract one from the number of that drink left in the machine.  If the user selects a drink that has sold out, a message should be displayed. The loop then repeats.</p>
  
  <p>When the user chooses to quit the program it should display the total amount of money the machine earned.  </p>
  
  <p>Drink Name
  Drink Cost<br>
  Number of Drinks in Machine </p>
  
  <p>The program should create an array of five structures.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  struct VendItem {
      string drink_name;
      double cost;
      int amount;
  
  
  };
  
  
  int main()
  {
  
      VendItem items[5];
      items[0] = { {"Cola", .75, 20} };        
      items[1] = { {"Rootbeer", .75, 20} };       
      items[2] = { {"Lemon-lime", .75, 20 } };     //These give me an error
      items[3] = { { "Grape Soda", .80, 20 } };    // What makes this wrong?
      items[4] = { { "Cream Soda", .80, 20 } };   
  
      for (int i = 0; i &lt; 5; i++)
      {
          cout &lt;&lt; items[i].drink_name &lt;&lt; endl;
      }
  
      system("pause");
      return 0;
  }
  </code></pre>