Original Post
Hi, I'd like to derive template std::vector so that I get an int-value instead of a size_type-value when calling the .size() member function. What I have looks like following and it is declared in the stdafx.h. The problem is that I now get error messages as follows: error C2661: 'CMyVector::CMyVector' : no overloaded function takes 2 arguments or error C2664: 'CMyVector::CMyVector(const CMyVector &)' : cannot convert parameter 1 from 'int' to 'const CMyVector &' What is wong?
template <class T> class CMyVector :public std::vector<T>
{
public:
int size() const
{
return (int(std::vector<T>::size()));
}
};
#define stdVector CMyVector