Good day. I am writing my vector. It is necessary to overload the above operators. Vector.h
class Vector { // ... template<typename T1> friend std::ostream& operator<< (std::ostream&, Vector<T>&); // ... }; template<typename T> std::ostream& Vector<T>::operator << (std::ostream& os, Vector<T>& v) { for(int i=0;i<v.size();i++) { os << v.at(i) << " "; } return os; } It gives the following error:
'std::ostream Vector<T>::operator<<(std::ostream, const Vector<T>&)' must take exactly one argument std::ostream Vector<T>::operator << (std::ostream output, Vector<T> const& v) ^