title: Can't seem to call function correctly in C++
body: <p>EDIT: Thank you everyone for taking the time to answer. I tried everyone's suggestions one by one and it still didn't work. I really wanted to hand this in without having to ask the professor for help and show I couldn't figure out how to do it, but at this point, I guess I'll have to do just that. I appreciate you taking the time to help! Thank you.</p>
  
  <p>I'm taking a C++ course and have an assignment I am having trouble with. I keep getting the error: "expected primary-expression before 'int'" by all three array declarations. And "was not declared in this scope" by all three passing addresses. This is on the compiler I usually use. I tried a different compiler, and the error I got was "prog.cpp:14:38: error: cannot convert 'std::array<em>' to 'int</em>' for argument '1' to 'void addArrays(int*, int*, int*)'
       addArrays(&amp;array1,&amp;array2,&amp;array3);"
  I'm not really sure what's going on, as I'm a beginner and was hoping someone could tell me what those errors mean and what I can do to fix them. Thank you in advance. Here is the code I have:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;array&gt;
  using namespace std;
  void addArrays(int*, int*, int*);
  
  int main()
  {
      array&lt; int, 20 &gt;array1 = 
          {7,45,90,1,33,254,3,8,9,4,2,6,77,5,9,2,22,4,12,6};
      array&lt; int, 20 &gt;array2 =
          {88,4,6,75,1,12,33,99,66,88,7,4,44,4,3,13,5,4,9,3};
      array&lt; int, 20 &gt;array3;
  
      addArrays(&amp;array1,&amp;array2,&amp;array3);   
  
      cout &lt;&lt; "Array1 + Array2 = Array3" &lt;&lt; endl;
      int j;
      for(j=0; j&lt;20; ++j)
          cout &lt;&lt; array1[j] &lt;&lt; "+" &lt;&lt; array2[j] &lt;&lt; "=" &lt;&lt; array3[j] &lt;&lt; endl;
  
      return 0;
  }
  
  void addArrays(int *array1, int *array2, int *array3)
  {
      int i;
      for(i=0; i&lt;20; ++i) 
          array3[i] = array1[i]+array2[i];
  }
  </code></pre>