template <class T>
class Stack // an abstract stack base class
Stack() {}
virtual void pop() = 0; // all pure
virtual T top() const = 0;
virtual void push(const T& t) = 0;
virtual unsigned int size() const = 0;
template <class T>
class VStack : public Stack<T> // a vector-based implementation
vector<T> vec;
VStack() {}
void pop() { vec.pop_back(); }
T top() const { return vec[vec.size() - 1];}
void push (const T& t) { vec.push_back(t);}
unsigned int size() const { return vec.size(); }

How do call these method into the main method?

What doesn't work with this:

  VStack<double> A;
  std::cout<<"A =="<<A.size()<<std::endl;

You remember that you have to use a template type in declaring VStack and that you might need to explicitly initialize the template if VStack and Stack are in separate files e.g. Add

template class Stack<double>;
template class VStack<double>;

HOWEVER: you may have made a complete mess, because you seem to have using namespace std; in your code, your names stack, etc are very close to the std names and you could easily be having real problems there.