Guest User

Untitled

a guest
Nov 15th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. class Test
  4. {
  5. private:
  6. int count;
  7. public:
  8. Test(): count(5){}
  9.  
  10. void operator =()
  11. {count=count+1;
  12. }
  13. void display()
  14. {cout<<"count:"<<count;
  15. }
  16.  
  17. };
  18.  
  19. int main()
  20. {
  21. test t;
  22. =t;
  23. t.display()
  24. return 0;
  25. }
Add Comment
Please, Sign In to add comment