Advertisement
Guest User

Untitled

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