Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. class A
  2. {
  3. int x;
  4. public:
  5. setX(int x1)
  6. {
  7. x = x1;
  8. }
  9. void showA(void)
  10. {
  11. cout << x;
  12. }
  13. };
  14.  
  15. class B
  16. {
  17. int y;
  18. public:
  19. void setY(int y1)
  20. {
  21. y = y1;
  22. }
  23. showB(void)
  24. {
  25. cout << y;
  26. }
  27. }objB;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement