fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. class Punkt
  6. {
  7. int SetX;
  8. int SetY;
  9.  
  10. public:
  11. Punkt(int X, int Y)
  12. {
  13. SetX = X;
  14. SetY = Y;
  15. }
  16. // ~Punkt();
  17. };
  18.  
  19. class Odcinek
  20. {
  21. Punkt A;
  22. Punkt B;
  23.  
  24. public:
  25. Odcinek(int X1, int X2, int Y1, int Y2):A(X1,Y1),B(X2,Y2)
  26. {
  27. cout<<"Konstruktor"<<endl;
  28. }
  29.  
  30. //~Odcinek();
  31. };
  32.  
  33. int main()
  34. {
  35. Odcinek CD(1,1,5,5);
  36. cout << "Hello World!" << endl;
  37. return 0;
  38. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
Konstruktor
Hello World!