Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template<class T>
- class Array
- {
- private:
- //...
- public:
- //...
- friend ostream& operator<<(ostream &os, const Array<T> &obj);
- };
- template<class T>
- ostream& operator<<(ostream &os, const Array<T> &obj)
- {
- //..
- return os;
- }
- cout << "arr: " << arr << endl;
- template<typename U>
- friend ostream& operator<<(ostream &os, const Array<U> &obj);
Add Comment
Please, Sign In to add comment