Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- 18 using namespace std;
- 17
- 16 class Date {
- 15 private:
- 14 int x;
- 13 public:
- 12 Date(int value) : x(value) { }
- 11 void friend PrintDate(Date &d);
- 10 };
- 9
- 8 void Date::PrintDate(Date &d) {
- 7 printf("x = %d\n", d.x);
- 6 }
- 5
- 4 int main() {
- 3 Date d1(1);
- 2 printDate(d1);
- 1 return 0;
- 0 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement