fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class opcje
  5. {
  6. private:
  7. int rok;
  8. public:
  9. void set(int r)
  10. {
  11. rok = r;
  12. }
  13.  
  14. int get() const
  15. {
  16. return rok;
  17. }
  18. };
  19.  
  20. class dane
  21. {
  22. public:
  23. int zwroc(const opcje& o)
  24. {
  25. return o.get();
  26. }
  27. };
  28.  
  29. int main()
  30. {
  31. opcje o;
  32. dane d;
  33.  
  34. o.set(2013);
  35. cout<<d.zwroc(o)<<endl;
  36. return 0;
  37. }
Success #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
2013