The following code excerpt is responsible for a cryptic MSVC++ compiler error:
template class Vec : public vector{
public:
Vec() :
Try
template class Vec : public vector{
public:
Vec() : vector(){} // no
Vec(int s) : vector(s){} // same
T& operator[](int i){return at(i); }
const T& operator[](int i)const{ return at(i);}
};
The constructor for a template class does not include the template signature in its name.
As a side note, your second constructor should really be
Vec(typename vector::size_type s) : vector(s){} // not necessarily int
Finally, you really shouldn't derive from vector, as it has a non-virtual destructor. Do not attempt to delete a Vec through a pointer to a vector.