here is my code:
#include <iostream>
using namespace std;
template<typename T>
class List
{
public:
List(T);
};
template<typename T>
class A: public List<T>
{
public:
};
int main()
{ //my problem is here...!
A a(10);
}
I don't know how to declare this class in main
and use it.
In this case, I have this error:
missing template arguments before ‘a’
and when I write:
template(typename T)
A a(10);
I give this error:
g++ -std=c++11 -c main.cpp error: a template declaration cannot appear at block scope template ^~~~~~~~