unresolved external symbol "int randomNumber"
<p>Can please someone explain me how to link the functions @ functions.cpp to main.cpp</p>

<p>note: I want both files functions.cpp and main.cpp to use the same variables from header.h</p>

<p>Thank you!</p>

<p><strong>main.cpp</strong></p>

<pre><code>#include "Header.h"
#include &lt;iostream&gt;

using namespace std;
int multi();
int printOutRanomdNumber();    


int main()
{
cout &lt;&lt; "Eneter a number you want to multiply" &lt;&lt; endl;
cout &lt;&lt; multi() &lt;&lt;endl;
cout &lt;&lt; printOutRanomdNumber();

system("pause");
return 0;
}
</code></pre>

<p><strong>header.h</strong></p>

<pre><code>#ifndef _HEADER_
#define _HEADER_

#include &lt;iostream&gt;

using namespace std;

extern int randomNumber;
int multi();
int printOutRanomdNumber();    


#endif
</code></pre>

<p><strong>functions.cpp</strong></p>

<pre><code>#include "Header.h"
#include &lt;iostream&gt;

using namespace std;

int multi()
{
    int x;
    cin &gt;&gt; x;
    return(x=x*x);
} 
int printOutRanomdNumber()
{
    cout &lt;&lt; "Please enter a random number" &lt;&lt; endl;
    cin &gt;&gt; randomNumber;
    return (randomNumber);
}
</code></pre>
