c++ calling functions with vectors as the parameter
<p>I have the following code that I keep getting this error, when I try to build it:</p>

<p>Error:</p>

<pre><code>1&gt;------ Build started: Project: practice, Configuration: Debug Win32 ------
1&gt;  pratice.cpp
1&gt;pratice.obj : error LNK2019: unresolved external symbol "double __cdecl CalcScore(class std::vector&lt;double,class std::allocator&lt;double&gt; &gt; *)" (?CalcScore@@YANPAV?$vector@NV?$allocator@N@std@@@std@@@Z) referenced in function _main
1&gt;C:\Users\Neil Armstrong\Desktop\practice\Debug\practice.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
</code></pre>

<p>The code is:</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;vector&gt;
#include &lt;algorithm&gt;
using namespace std;

double CalcScore(double);
void points(double);
void grade(char);

int main ()
{ 

  double CalcScore(vector&lt;double&gt; *);
  // Declare constant
  double first_exam = 0;
  double second_exam = 0;
  double final_exam = 0;
  double aHomework = 0;
  double totalPoints = 0;
  double median = 0;
  double SUM = 0;


  // Declare a vector of doubles
  vector&lt;double&gt; homework;

  //  Ask the user to enter in the score for the first midterm.
  cout &lt;&lt; "\nPlease enter in the score for the first exam: ";
  // This value is read in and saved.
  cin &gt;&gt; first_exam;

      // Ask the user to enter in the score for the second midterm.
  cout &lt;&lt; "\nPlease enter in the score for the second exam: ";
      // This value is read in and saved.
  cin &gt;&gt; second_exam;

      // Ask the user to enter in the score for the final exam.
  cout &lt;&lt; "\nPlease enter in the score for the final exam: ";
      // This value is read in and saved.
  cin &gt;&gt; final_exam;

  // Store the homework scores in a vector.
  // Uses the push_back function to add each homework score to the vector.
  // Then asks the user to enter in the scores for the homework assignments. 
      // Any number of scores can be entered in. 
  // When done, the user signals completion by pressing Ctrl-z (the Ctrl key 
      // and the letter z) followed by the Enter key.
  cout &lt;&lt; "\nEnter the score for a homework assignment(press ctrl-z to quit): ";
  cin&gt;&gt;aHomework;
  while (!cin.eof()) // No Ctrl-Z
  {
     if (cin.good()) // The data entry was valid, i.e., an integer
     {
     homework.push_back(aHomework);
     }
     else
     {
     // The failbit was set, so this entry must be invalid.
     cout &lt;&lt; "Invalid entry!" &lt;&lt; endl;
     cin.clear(); // clear error flag
     cin.sync(); // Re-sync stream
     }
     // Get next data entry
     cout &lt;&lt; "\nEnter the score for a homework assignment(press ctrl-z to quit): ";
     cin&gt;&gt;aHomework;
     }  

     median = CalcScore( &amp;homework);
     cout &lt;&lt; endl;
     system("PAUSE");
     return 0;
     }// End main

     double CalcScore(vector&lt;double&gt; homework)
     {
     double median = 0;
     const int TWO = 2;
     size_t size = homework.size();

     sort(homework.begin( ), homework.end( ) );

     if (size  % TWO == 0)
     {
     median = (homework[size / TWO - 1] + homework[size / TWO]) / TWO;
     }
     else 
     {
     median = homework[size / TWO];
     }

     return median;
   }
</code></pre>

<p>Any help in resolving this error would be great
Thank you,
Neil</p>
