Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. #include "punkt.hpp"
  4.  
  5. using namespace std;
  6.  
  7. class odcinek
  8. {
  9. punkt p, k;
  10. public:
  11. odcinek(punkt p, punkt k)
  12. {
  13. this->p = p, this->k = k;
  14. }
  15. };
  16.  
  17. int main() {
  18. punkt a, b(3, -4), c(5, 12);
  19. a.przesun_x(2);
  20. a.przesun_y(8);
  21. cout << "a = [" << a._x() << ", " << a._y() << "]" << endl;
  22. cout << "b = [" << b._x() << ", " << b._y() << "]" << endl;
  23. cout << "c = [" << c._x() << ", " << c._y() << "]" << endl;
  24. punkt *p = new punkt(7, 19);
  25. cout << "*p = [" << p->_x() << ", " << p->_y() << "]" << endl;
  26. delete p;
  27. odcinek odc(a, b);
  28. return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement