seperating interface and implemention with normal functions
<p>this seems like it should be pretty simple, im probably leaving something simple out.</p>

<p>this is the code im trying to run. it is 3 files, 2*cpp and 1*header.</p>

<p>this wont run on code blocks, im trying to see what im missing!</p>

<p>these are the errors given:</p>

<p>obj\Debug\main.o||In function `main':|</p>

<p>|9|undefined reference to `generateArray(int*, int)'|</p>

<p>|11|undefined reference to `reverseOrder(int*, int*, int)'|</p>

<p>|13|undefined reference to `displayArray(int*, int*, int)'|</p>

<pre><code>// lab6.h
#ifndef LAB6_H_INCLUDED
#define LAB6_H_INCLUDED

int const arraySize = 10;
int array1[arraySize];
int array2[arraySize];

void generateArray(int[], int );
void displayArray(int[], int[], int );
void reverseOrder(int [],int [], int);

#endif // LAB6_H_INCLUDED

// lab6.cpp

#include "lab6.h"
#include &lt;iostream&gt;
#include &lt;cstdlib&gt;
#include &lt;ctime&gt;
#include &lt;iomanip&gt;
using std::cout; using std::endl;
using std::rand; using std::srand;
using std::time;
using std::setw;

void generateArray(int array1[], int arraySize)
{
    srand(time(0));
    for (int i=0; i&lt;10; i++)
    {
        array1[i]=(rand()%10);
    }
}

void displayArray(int array1[], int array2[], int arraySize)
{
    cout&lt;&lt;endl&lt;&lt;"Array 1"&lt;&lt;endl;
    for (int i=0; i&lt;arraySize; i++)
    {
        cout&lt;&lt;array1[i]&lt;&lt;", ";
    }
    cout&lt;&lt;endl&lt;&lt;"Array 2"&lt;&lt;endl;
    for (int i=0; i&lt;arraySize; i++)
    {
        cout&lt;&lt;array2[i]&lt;&lt;", ";
    }
}

void reverseOrder(int array1[],int array2[], int arraySize)
{
    for (int i=0, j=arraySize-1; i&lt;arraySize;j--, i++)
    {
        array2[j] = array1[i];
    }
}

// and finally main.cpp
#include "lab6.h"

int main()
{
    generateArray(array1, arraySize);
    reverseOrder(array1, array2, arraySize);
    displayArray(array1, array2, arraySize);
    return 0;
}
</code></pre>
