Unresolved External Symbol calling function
<p>I'm working on a assignment for class so this is only part of the code, but whenever I try to compile it I'm getting this error.</p>

<pre><code>1&gt;pass9.obj : error LNK2019: unresolved external symbol "void __cdecl bestbuy(double,double,double)" (?bestbuy@@YAXNNN@Z) referenced in function _main
1&gt;C:\Users\YoggieBear\Desktop\school\pass9\Debug\pass9.exe : fatal error LNK1120: 1 unresolved externals
</code></pre>

<p>Code is below</p>

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

void bestbuy(double, double, double);
void discountresults (double, double);
void howmany(double, double);

int price1, price2, price3;

int main ()
{

cout&lt;&lt;"Please enter 3 prices.\n";//This tests function bestbuy.
cin&gt;&gt;price1&gt;&gt;price2&gt;&gt;price3; 
bestbuy(price1,price2,price3);
cout&lt;&lt;"Your lowest price entered was "&lt;&lt;price1&lt;&lt;" and it was the "&lt;&lt;price2&lt;&lt;" number you entered.\n";


system ("PAUSE");
return 0;
}

void bestbuy(double &amp;val1,double &amp;val2, double val3)
{
if (val1 &lt; val2 &amp;&amp; val1 &lt; val3)
val2 = 1;
else if (val2 &lt; val1 &amp;&amp; val2 &lt; val3)
    {val1 = val2;
     val2 = 2;}
else
   {val1 = val3;
    val2 = 3;}
}
</code></pre>
