Q:

Interface Implementation throws expected class-name error

I'm trying to implement a data structure that inherits from an abstract type the List in question. I'm following the guide from The Tour Of C++ book.
Unfortunately my code doesn't compile I went over similar questions but the problem is different I only use one .cc file no headers nothing just a simple test .
Edit : List<T> worked as I was inheriting from a class template.

template <class T>
class List {

public:
    virtual int size()=0;
    virtual T get(int)=0;
    virtual void set(int,T)=0;
    virtual void add(T)=0;
    virtual void remove(int)=0;
};

template<class T>
class ArrayStack : public List {

    public:

        ArrayStack(){
            len = 0;
        }

        void add(T e){
            a.push_back(e);
            len++;
        }
        T get(int idx){
            return a[idx];
        }
        void set(int idx,T e){
            a[idx] = e;
        }
        int size(){
            return len;
        }

        void remove(int idx){
            a.erase(a.begin()+idx);
        }
        ~ArrayStack(){}

    private:
        std::vector<T> a;
        int len;
};

template <class T>
void print_list(List<T>& l){
    for(auto i=0;i < l.size();i++){
        std::cout << l.get(i) << std::endl;
    }
}

int main(){

    ArrayStack<int> m;
    m.add(1);
    m.add(2);
    m.add(3);

    print_list(m);

}

The compilation error :
list.cc:28:32: error: expected class-name before ‘{’ token
 class ArrayStack : public List {

A:

A base must always be a class. List is not a class. It is a class template. It is not possible to inherit from a template.
Instance of a class template, such as List<T>, is a class. I suspect that you may have intended to use that as the base.

