Advertisement
MeehoweCK

Untitled

Oct 25th, 2022
620
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. #include <iostream>
  2. #include "todo/rectangle.h"
  3. #include "todo/square.h"
  4. #include "todo/plane.h"
  5.  
  6. using namespace std;
  7. using namespace osfes;
  8.  
  9. int main()
  10. {
  11.     Plane plane(10, 20);
  12.  
  13.     Rectangle* tab[2];
  14.     tab[0] = new Rectangle(1, 2, 3, 4, plane);
  15.     tab[1] = new Square(1, 2, 3, plane);
  16.  
  17.     cout << tab[0]->getName() << endl;
  18.     cout << tab[1]->getName() << endl;
  19.  
  20.     delete tab[0];
  21.     delete tab[1];
  22.  
  23.     return 0;
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement