' ' was not declared in this scope : <p>I was trying to implement this dynamic array thing and I ran into some problems
When I try to compile it, the compiler tells me that bunch of my functions are not declared in this scope</p>

<p>here are the files</p>

<p><em>dynamicArray.h</em></p>

<pre><code>#ifndef DYNAMICARRAY_H
#define DYNAMICARRAY_H

#include &lt;ctime&gt;
#include&lt;iostream&gt;
class dynamicArray{
public:
    dynamicArray();
    int * array_constructor(int *  &amp;intPtr, int &amp;size );
    int * array_resize(int * &amp;intPtr, int&amp; currSize, int&amp; newSize);
    void array_destructor(int * &amp;intPtr);
    void array_set(int* &amp;intPtr, int &amp;size);
};
#endif  // DYNAMICARRAY_H
</code></pre>

<p><em>dynamicArray.cpp</em></p>

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


int * array_constructor(int *  &amp;intPtr, int &amp;size ){
    if(intPtr != NULL){
        delete [] intPtr;
    }

    intPtr = new int[size];
    for (int i = 0; i &lt; size; i++){
        intPtr[i] = i*i;
    }

    return intPtr;
}

int * array_resize(int * &amp;intPtr, int&amp; currSize, int&amp; newSize){
    if(newSize == 0){
        delete [] intPtr;
        return NULL;
    }else if((newSize == currSize) || (newSize &lt; 0)){
        return intPtr;
    }

    int * array = new int[newSize];
    for (int i = 0; i &lt; newSize; i++){
        array[i] = i*i;
    }

    return array;
}

void array_destructor(int * &amp;intPtr){
    delete [] intPtr;
    intPtr = NULL;
}

void array_set(int*&amp; intPtr, int&amp; size){
    srand(time(0));
    for (int i = 0; i &lt; size; i++){
        intPtr[i] = rand();
    }
}
</code></pre>

<p><em>main.cpp</em></p>

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

using namespace std;

void print(int array[], int size){
    if(array == NULL){
        cout &lt;&lt; "array is empty" &lt;&lt; endl;
        return;
    }

    for(int i = 0; i &lt; size; i++){
        cout &lt;&lt; "array[" &lt;&lt; i &lt;&lt; "] = " &lt;&lt; array[i] &lt;&lt; endl;
    }
    cout &lt;&lt; endl;
    return;
}

int main() {
    int *myArray = NULL;
    int size = 8;
    int newSize1 = 10;
    int newSize2 = 5;
    int newSize3 = -1;
    int finalSize = 1;

    myArray = array_constructor(myArray, size);
    print(myArray, size);

    myArray = array_resize(myArray, size, newSize1);
    print(myArray, newSize1);

    myArray = array_resize(myArray, newSize1, newSize2);
    print(myArray, newSize2);

    myArray = array_resize(myArray, newSize2, newSize3);
    print(myArray, newSize2);

    array_set(myArray, newSize2);
    print(myArray, newSize2);

    array_destructor(myArray);
    print(myArray, finalSize);

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

<p>I tried putting int * dynamicArray::array_constructor(int *  &amp;intPtr, int &amp;size ) instead, but no luck
Did I do something wrong with the header file or in dynamicArray.cpp?
This worked before, but I forgot how to do it.</p>
