Guest User

Untitled

a guest
May 24th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. ostream & operator<< (ostream &streamout, const Word & arg)
  2. {
  3. for(int i=0;i < 5;++i)
  4. streamout << arg.arr[i];
  5. return streamout;
  6. }
  7. That's my overloaded operator<<
  8.  
  9. and
  10.  
  11.  
  12. int main()
  13. {
  14. Word foo1 = "fuck"; // constructor for char *
  15. cout << " foo1 = " << foo1 << endl;
  16.  
  17. Word foo2(foo1); // copy constructor
  18. cout << " foo2 = " << foo2 << endl;
  19.  
  20.  
  21. that's the part where i print it....
Add Comment
Please, Sign In to add comment