I keep getting the error "use of class template requires template argument list" when I compile the following code in VC++6. What is wrong with it?
template <class T>
class StdVector{
public:
StdVector & operator=(const StdVector &v);
};
template <typename T>
StdVector & StdVector<T>::operator=(const StdVector &v){
return *this;
}
You need to put the template parameter in the return type:
template <typename T>
StdVector<T> & StdVector<T>::operator=(const StdVector &v)
{
return *this;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With