It seems like i cant compile this... The error is in the bolded line inside the template class Vec:Code:#include <iostream> #include <vector> using namespace std; struct Entry { string name; int number; }; void add_entries(int n, vector<Entry> &vec) { vec.resize(vec.size() + n); } template<class T> class Vec : public vector<T> { public: Vec():vector<T>() { } //call the default vector constructor Vec(int s):vector<T>(s) { } T& operator[](int i) { return at(i); } const T& operator[] (int i) const { return at(i); } };
I dont know why?`template<class _Tp, class _Alloc> class std::vector' used without template parameters



LinkBack URL
About LinkBacks




)