Hello, I've just recently tried to make a class template whose constructor should be able to accept a variable amount of arguments of the class passed to the template. I have something like this, with the prototype inside the class definition, and the actual implementation of the constructor defined outside:
template<class T>
class List
{
public:
List(const T&, ...);
}
List::List(const T& first, ...) {
// constructor here
}
This of course gives me errors, and I'm not entirely sure how to go about allowing the variable length of parameters, and combine that with the template idea. Thanks for any help!