Which of these would be the proper declaration for overloading the stream insertion operator of a templated class? templ
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Which of these would be the proper declaration for overloading the stream insertion operator of a templated class? templ
Which of these would be the proper declaration for overloading the stream insertion operator of a templated class? template <class T> class List{ template <class T> friend ostream& operator<<(ostream&, const List<T>&); public: List(); List(); 1/other functions template <class T> class List{ friend ostream& operator<<(ostream&, const List<T>&); public: List(); -List(); 1/other functions } template <class T> class List{ template <class V> friend ostream& operator<<(ostream&, const List<v>&); public: List(); -List(); //other functions None of these.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!