title: cannot convert ‘double’ to ‘double*’ for argument ‘1’ to ‘float sumall(double arr[])
body: <p>I am a C &amp; Assembly programmer. But C++ is so dumb. I cannot understand what I am doing wrong here. Can someone explain to me why I am getting this error? Here is my code:
    GNU nano 2.2.6                  Файл: assignment4.cpp                                           </p>
  
  <pre><code>#include &lt;cstdlib&gt;
  #include &lt;iostream&gt;
  
  #define SIZE 10
  int counter = 0;
  const double TAX = 1.13;
  
  float sumall(double arr[]);
  
  int main (int argc, char **argv)
  {       double array[SIZE] = {0,0,0
                               ,0,0,0  
                               ,0,0,0  
                               ,0};
  
      while (counter &lt; (SIZE-1))
      {
              if (array[counter-1] == -99)
                      break;
              else continue;
              std::cout &lt;&lt; "Enter any number [1 WORD long]: ";
              std::cin &gt;&gt; array[counter];
              ++counter;
      }
  
      std::cout &lt;&lt; "The total price is: $" &lt;&lt; sumall(array[SIZE]);
  return EXIT_SUCCESS;
  }
  
  float sumall(double arr[])
      {
              float total=0;
                      for(int i=0;i&lt;SIZE;++i)
                      {
                              total+=arr[i];
                      }
              total*=TAX;
      return (total*TAX);
  }
  </code></pre>
  
  <p>Also, how can I fix this error using templates (which I heard is possible in C++), thanks!</p>