Function prototype missing even though it exists
<p>I am not very experienced with C++, so I apologize in advance if I made some (a lot) of stupid mistakes.</p>

<p>The instruction for the task is as follows:
In the class AVector, declare a dynamic array of double type to store tuples for the
Euclidean vector, and declare an integer member to store the dimension of the vector. We are supposed to get the user to enter the size and the values for v1 and v2. Then we are supposed to use v1 and v2 to produce the output in the following format.</p>

<pre><code>v3 = v1 + v2 = (v1[0]+v2[0]  v1[1]+v2[1] .... v1[n]+v2[n])
v3 = v1 - v2 = (v1[0]-v2[0]  v1[1]-v2[1] .... v1[n]-v2[n])
v3 = v1 * v2 = (v1[0]*v2[0] + v1[1]*v2[1] + .... + v1[n]*v2[n])
</code></pre>

<p>If the number of elements in v1 and v2 are not the same or one of them is empty, we are supposed to produce an error message.</p>

<p>Example:</p>

<p>If v1's dynamic array has 3 elements: 1.0  2.5  3.0</p>

<p>If v2's dynamic array has 3 elements: 2.0  2.0  1.0</p>

<p>Then the output is:</p>

<pre><code>v3 = v1 + v2 = (3.0   4.5   4.0)
v3 = v1 - v2 = (-1.0  0.5   2.0)
v3 = v1 * v2 = 10
</code></pre>

<p>Now, my problem is that I keep getting "Error: The function "processVector" must have a prototype." even though the function prototype for processVector does exist.</p>

<p>So far what I have is as follow:</p>

<pre><code>    #include&lt;iostream&gt; 

class AVector
{
   private:
      int size;
      double* array;
   public:
      AVector()
      {
         array = NULL;
      }

      AVector(int)
      {
         double input;
         size = a;
         array = new double[size];

         int counter = 0;

         while(counter &lt; size)
         {
            cin &gt;&gt; input;
            array[counter] = input;
            counter++;
         }
      }

      ~AVector()
      {
         delete[] array;
      }

      void printArray(int a)
      {
         cout &lt;&lt; "Euclidean vector v" &lt;&lt; a &lt;&lt; " = (";
         for(int i = 0; i &lt; size; i++)
         {
            cout &lt;&lt; array[i] &lt;&lt; ' ';
         }
         cout &lt;&lt; ')' &lt;&lt; endl;
      }

      void processVector(AVector a, AVector b)
      {
         if(a.size != b.size)
         {
            cout &lt;&lt; "Two Euclidean vector should be in the same Euclidean space" &lt;&lt; endl;
         }
         else
         {
            //...
         }
      }
};
</code></pre>

<p>main.cpp</p>

<pre><code>#include&lt;iostream&gt;
#include "AVector2.h"
using namespace std;

int main()
{
   int dimension;

   cout &lt;&lt; "Input dimension and tuples for a Euclidean vector v1: ";
   cin &gt;&gt; dimension;
   AVector v1 = AVector(dimension);
   v1.printArray(1); 

   cout &lt;&lt; endl;

   cout &lt;&lt; "Input dimension and tuples for a Euclidean vector v2: ";
   cin &gt;&gt; dimension;
   AVector v2 = AVector(dimension);
   v2.printArray(2);

   cout &lt;&lt; endl;

   processVector(v1, v2);
   return 0;
}
</code></pre>

<p>I'd very much appreciate it if someone can point out what I did wrong.
Thank you in advance.</p>
