Guest User

Untitled

a guest
Nov 25th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. template<class T>
  2. class Array
  3. {
  4. private:
  5. //...
  6.  
  7. public:
  8. //...
  9. friend ostream& operator<<(ostream &os, const Array<T> &obj);
  10. };
  11.  
  12. template<class T>
  13. ostream& operator<<(ostream &os, const Array<T> &obj)
  14. {
  15. //..
  16.  
  17. return os;
  18. }
  19.  
  20. cout << "arr: " << arr << endl;
  21.  
  22. template<typename U>
  23. friend ostream& operator<<(ostream &os, const Array<U> &obj);
Add Comment
Please, Sign In to add comment