Stack implementation using vectors with no overflow version 1.0 This is an implementation of a stack where I have used vectors. Can anyone please review it and let me know how I can improve this code and overall coding practice?

    #include"iostream"
class Mystack
{
private:
    int *A;
    int top;
    int size;
public:
    Mystack(int capacity);
    void push(int x);
    int pop();
    int topElement();
    void print();
    bool isEmpty();
};
Mystack::Mystack(int capacity)
{
    top = -1;
    size = capacity;
    A = new int[capacity];
}
void Mystack::push(int x)
{

    if (top + 1 == size)
    {
        int *vec = new int[size + size];
        for (int i = 0; i &lt; size; i++)
        {
            vec[i] = A[i];
        }
        A = vec;
        size = size * 2;
        top++;
        A[top] = x;
        return;
    }
    else
    {
        top++;
        A[top] = x;
    }
}
int Mystack::pop()
{
    if (isEmpty())
    {
        std::cout &lt;&lt; "Stack Underflow" &lt;&lt; std::endl;
    }
    else
    { 
        std::cout &lt;&lt; "The popped element is" &lt;&lt; A[top];
        return A[top--];
    }
    return 0;
}
bool Mystack::isEmpty()
{
    if (top == -1)
    {
        std::cout &lt;&lt; "Is Empty" &lt;&lt; std::endl;
        return true;
    }
    else
    {
        std::cout &lt;&lt; "Not Empty" &lt;&lt; std::endl;
        return false;
    }
}
int Mystack::topElement()
{
    std::cout &lt;&lt; "The top element is : " &lt;&lt; A[top];
    return A[top];
}
void Mystack::print()
{
    for (int i = 0; i &lt;= top; i++)
    {
        std::cout &lt;&lt; A[i] &lt;&lt; " ";
    }
}
void main()
{
    Mystack s1(10);
    int num, ch = 1;
    while (ch &gt;0)
    {
        std::cout &lt;&lt; "\n1. PUSH" &lt;&lt; std::endl;
        std::cout &lt;&lt; "2. TOP" &lt;&lt; std::endl;
        std::cout &lt;&lt; "3. IsEmpty" &lt;&lt; std::endl;
        std::cout &lt;&lt; "4. POP" &lt;&lt; std::endl;
        std::cout &lt;&lt; "5. EXIT" &lt;&lt; std::endl;
        std::cout &lt;&lt; "6. Print" &lt;&lt; std::endl;
        std::cout &lt;&lt; "Enter the choice" &lt;&lt; std::endl;
        std::cin &gt;&gt; ch;
        switch (ch)
        {
        case 1:
            std::cout &lt;&lt; "Enter the number to be pushed" &lt;&lt; std::endl;
            std::cin &gt;&gt; num;
            s1.push(num);
            break;
        case 2:
            std::cout &lt;&lt; "Get the TOP Element" &lt;&lt; std::endl;
            s1.topElement();
            break;
        case 3:
            std::cout &lt;&lt; "Check Empty" &lt;&lt; std::endl;
            s1.isEmpty();
            break;
        case 4:
            std::cout &lt;&lt; "POP the element" &lt;&lt; std::endl;
            s1.pop();
            break;
        case 5: exit(0);
        case 6:
            s1.print();
            break;
        }
    }
    system("pause");
}
What is A?  You shouldn't use single-character variables as they're very ambiguous.  You may know what it's for, but it doesn't mean anyone else does.
Any member function that doesn't modify any data members should be const.

One example is topElement():

int Mystack::topElement() const
{
    std::cout &lt;&lt; "The top element is : " &lt;&lt; A[top];
    return A[top];
}

This class performs memory allocation, but you never deallocate it, making it one big memory leak for anyone using it.

You should have a destructor that uses delete to free this memory:

Mystack::~Mystack()
{
    delete[] A;
}


With a destructor in place, you should also have a copy constructor and assignment operator defined, as per the Rule of Three.  It is especially important to define your own since the default ones perform a shallow copy, which shouldn't be done when you have pointers as data members. Those will instead be copied instead of the data they point to, which will mess up your data.
Although pop() "reports" underflows, it can still break since it doesn't handle errors properly.  Specifically, it'll return 0 if the stack is already empty.  Since 0 is a value, the calling code can store it like normal.  So, pop() can be called repeatedly and it will always return this value.

What you should do is have the function return void so that it won't have to return anything if the stack is empty.  This is also how it's done in the standard library, in case you weren't aware.
Something like this shouldn't be displaying simple output, though it may be okay if you're just testing the functions.  Otherwise, it should be done in main(), while the bool values should determine which messages should be displayed.
One case where output is really not needed is in isEmpty().  A simple function like this can just be done in one line:

return (top == -1);

It's important to know that main() should return int.  Some compilers allow it to return void, but this isn't allowed by the standard.  Regardless, you should change it to return int.
Be aware that system("PAUSE") is Windows-specific thus non-portable.  If you'd like to do a similar pause that is portable, use something like std::cin.get().
If you'd like for this stack class to handle types other than int, then consider using templates.  There are many resources on this, and it should be worthwhile to learn about this.