Guest User

Untitled

a guest
May 27th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1.      {
  2.   Date a(4),b(3);
  3.  
  4.    Date c = test(a,b);
  5.  
  6.    }
  7.  
  8. class Date {
  9.  
  10. private:
  11. //double d;
  12. int x;
  13. int z;
  14. static int prst;//静的記憶域期間
  15.  
  16. public:
  17.  
  18. Date();
  19.  
  20. Date(int x);
  21.  
  22. void print();
  23. //////////////////////////////////
  24. friend Date test(const Date& a, const Date& b)//friend関数
  25. {
  26. return Date(a.x + b.x);
  27. }
  28. //////////////////////////////////
  29. int y = 0;
  30. static int pust;//静的記憶域期間
  31.  
  32. void pri(int x);
  33. static void pri_st(int x);
Add Comment
Please, Sign In to add comment