Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- Date a(4),b(3);
- Date c = test(a,b);
- }
- class Date {
- private:
- //double d;
- int x;
- int z;
- static int prst;//静的記憶域期間
- public:
- Date();
- Date(int x);
- void print();
- //////////////////////////////////
- friend Date test(const Date& a, const Date& b)//friend関数
- {
- return Date(a.x + b.x);
- }
- //////////////////////////////////
- int y = 0;
- static int pust;//静的記憶域期間
- void pri(int x);
- static void pri_st(int x);
Add Comment
Please, Sign In to add comment