title: Having trouble about 6 errors in my array code
body: <p>I can't seem to correctly run the code. Would be of a great help in finding the 6 errors. I am stuck and somehow no idea where to find the error for my simple array code.</p>
  <p>Here are the errors I get.</p>
  <p><a href="https://i.stack.imgur.com/3j9gl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3j9gl.png" alt="enter image description here" /></a></p>
  <pre><code>// This program uses two arrays to record the names of 6 types of pizza
  // and the sales numbers for each of these types
  // The program then finds the best and the worst selling pizzas
  
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  int main()
  {
      constint ARR_SIZE = 6; // Declare the array size and set it to 6
      // Declare the array of pizza names and record values in it
      int name[ARR_SIZE] = [ &quot;Pepperoni&quot;, &quot;Prosciutto&quot;, &quot;Vegetarian&quot;,
          &quot;Sausage&quot;,
          &quot;Supreme&quot;,
          &quot;Mozzarella&quot; ];
      int sales[ARR_SIZE]; // Declare the sales array
      int worstseller_number, bestseller_number; // The subscripts of the best- and worstseller
      string worstseller_name, bestseller_name; // The sale numbers of the best- and worstseller
  
      for (int i = 1; i &lt; ARR_SIZE; i++) // A loop to enter all sales numbers
  
      {
          cout &lt;&lt; &quot;Enter sales for &quot; &lt;&lt; name[i] &lt;&lt; &quot;: &quot;;
          cin &gt;&gt; sales[i];
      }
  
      // Make the first element in name[] the bestseller and the worstseller name
      worstseller_name = bestseller_name = name[0];
  
      // Make the first element in sales[] the bestseller and the worstseller sales amount
      worstseller_number = bestseller_number = sales[0];
  
      for (int i = 0; i &lt;= ARR_SIZE; i++) // Loop through all elements in sales[]
      {
          if (sales[i] &lt; worstseller_number) // If an element is less than the lowest...
          {
              worstseller_number = i; // make the lowest sales equal to its sales
              worstseller_name = name[i]; // make the worstseller name equal to its name
          }
  
          if (sales[i] &lt; bestseller_number) // If an element is higher than the highest...
          {
              bestseller_number = sales[i]; // make the highest sales equal to its sales
              bestseller_name = name[i]; // make the bestseller name equal to its name
          }
      }
  
      cout &lt;&lt; &quot;The bestselling pizza is &quot; &lt;&lt; bestseller_name &lt;&lt; &quot; with the sales of &quot;
           &lt;&lt; bestseller_number &lt;&lt; endl; // Display the best selling pizza
      cout &lt;&lt; &quot;The worst selling pizza is &quot; &lt;&lt; worstseller_name &lt;&lt; &quot; with the sales of &quot;
           &lt;&lt; worstseller_number &lt;&lt; endl;
  } // display the worst selling pizza
  </code></pre>