Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include "punkt.hpp"
- using namespace std;
- class odcinek
- {
- punkt p, k;
- public:
- odcinek(punkt p, punkt k)
- {
- this->p = p, this->k = k;
- }
- };
- int main() {
- punkt a, b(3, -4), c(5, 12);
- a.przesun_x(2);
- a.przesun_y(8);
- cout << "a = [" << a._x() << ", " << a._y() << "]" << endl;
- cout << "b = [" << b._x() << ", " << b._y() << "]" << endl;
- cout << "c = [" << c._x() << ", " << c._y() << "]" << endl;
- punkt *p = new punkt(7, 19);
- cout << "*p = [" << p->_x() << ", " << p->_y() << "]" << endl;
- delete p;
- odcinek odc(a, b);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement