error: request for member '..' in 'this', which is of non-class type '--* const'
<p>My first ever question here. Please excuse me, I have just entered into C++ and was starting up with DS. STACK!!!</p>

<p>My code: I think </p>

<pre><code>    using namespace std;
    typedef char stackElement;

    class Stack
    {
    public:
        stackElement *contents;   //dynamically allocated: as we do not know what would be the size of our array.
        int top, maxSize;               // current Top index in the array

                //max size of the array; we need it to know if the array is full

    Stack(int maxSize)
    {

        contents = new stackElement(maxSize);
        this.maxSize = maxSize;
        if(contents == NULL)
        {
            cout&lt;&lt;"Insufficient memory";
            exit(1);

        }

        top = -1;
    }
    ~Stack()
    {
        delete [] contents;
        contents = NULL;
        maxSize = 0;
        top = -1;

    }

    bool isEmpty()const
    {

        return top &lt; 0;
    }
    bool isFull() const
    {

        return top == maxSize - 1;
    }


    void push(stackElement element)
    {
        if(isFull())
        {
            cout&lt;&lt;"STACK IS ALREADY FULL";
            exit(1);
        }
        top = top + 1;
        contents[top] = element;
    }


};

int main()
{

    cout&lt;&lt;"STACK IMPLEMENTATION";
    int i = 1;
    Stack s1(i);


    s1.push('a');
    s1.push('1');
    return 0;
}
</code></pre>

<p>I am getting this error:</p>

<pre><code>error: request for member 'maxSize' in 'this', which is of non-class type 'Stack* const'
</code></pre>
